Skip to content
Prev 13451 / 63421 Next

idea for "virtual matrix/array" class

Thomas Lumley wrote:
Just to join in on the 'done it' threads here, this is what my Rmap 
package does with DBF files (they are the database component of ESRI 
Shapefile maps). I use the dbf library from shapelib to access a DBF 
file just like a data frame.

  My dbf objects keep track of selected rows and columns, from the 
database file, so its possible to do:

  db1 = db[1:10,]

  and db1 is still a proxy object to the same DBF file as db, but with 
attributes that tell it that it only has rows 1 to 10 in it. If you 
really want a data frame, you just as.data.frame() it.

  If you wanted to do this sort of thing for space-saving reasons you'd 
have to be very careful, since for some operations R might slurp it all 
into memory.

Baz

http://www.maths.lancs.ac.uk/Software/Rmap/