Re: [Rd] "Default" accessor in S4 classes

2013-01-10 Thread Martin Maechler
> Chris Jewell > on Wed, 9 Jan 2013 13:28:49 +1300 writes: > "CJ" == Chris Jewell > on Wed, 9 Jan 2013 13:28:49 +1300 writes: CJ> Okay, thanks for the input, All. I'd settled on the explicit coercion as.data.frame as well as the myObject[] syntax which makes a lot o

Re: [Rd] "Default" accessor in S4 classes

2013-01-08 Thread Chris Jewell
Okay, thanks for the input, All. I'd settled on the explicit coercion as.data.frame as well as the myObject[] syntax which makes a lot of sense. I'd also like to implement an as.double() method. However, I'm having trouble embedding this into my package. In the R file I have: setMethod("as.

Re: [Rd] "Default" accessor in S4 classes

2013-01-08 Thread John Chambers
To respond a little more directly to what you seem to be asking for: You would like an "automatic" conversion from your class (you don't give us its name, let's call it frameHDF for now) and "data.frame". In R (and in OOP generally) this sounds like inheritance: you want a frameHDF to be valid

Re: [Rd] "Default" accessor in S4 classes

2013-01-07 Thread Michael Lawrence
On Mon, Jan 7, 2013 at 3:23 PM, Chris Jewell wrote: > Hi All, > > I'm currently trying to write an S4 class that mimics a data.frame, but > stores data on disc in HDF5 format. The idea is that the dataset is likely > to be too large to fit into a standard desktop machine, and by using > subscript

Re: [Rd] "Default" accessor in S4 classes

2013-01-07 Thread Simon Urbanek
Chris, On Jan 7, 2013, at 6:23 PM, Chris Jewell wrote: > Hi All, > > I'm currently trying to write an S4 class that mimics a data.frame, but > stores data on disc in HDF5 format. The idea is that the dataset is likely > to be too large to fit into a standard desktop machine, and by using > s

[Rd] "Default" accessor in S4 classes

2013-01-07 Thread Chris Jewell
Hi All, I'm currently trying to write an S4 class that mimics a data.frame, but stores data on disc in HDF5 format. The idea is that the dataset is likely to be too large to fit into a standard desktop machine, and by using subscripts, the user may load bits of the dataset at a time. eg: > m