[R] A question about the ff package

Jens Oehlschlägel oehl_list at gmx.de
Fri Jan 8 00:56:48 CET 2010


Peter,

ff objects are not allowed as subscripts to ff objects. You can take several routes

1) use bit objects instead of logical or ff logical. This is fast and takes factor 32 less RAM than logicals (BTW bit objects can be coerced to ff via as.ff() and as.bit() but they convert to vmode "boolean" (1 bit), not "logical" (2 bits). Examples for working with bit are on http://ff.r-forge.r-project.org/ff&bit_UseR!2009.pdf

2) convert your logicals into positive integer subscripts (assuming that there are not too many elements selected, as you assume if writing bigData[select,]

3) keep your logical in a ff logical or ff boolean and then do chunked looping over both - the ff with the subscripts and the ffdf - and in each chunk convert the logical selection to integers, see 2)

HTH


Jens Oehlschlägel


P.S. you  might want to try the newer version on r-forge. It has several improvements but is not yet on CRAN because there is currently some issue with snow leopard.



More information about the R-help mailing list