[R-sig-hpc] ff package - Error selecting 0 rows.

"Jens Oehlschlägel" jens.oehlschlaegel at truecluster.com
Sat Jul 23 18:25:17 CEST 2011


Hi Ivan,

Thanks for reporting this bug.

>Error in as.integer.hi(x, ...) : object 'ret' not found

debug(as.integer.hi) and calling again shows that the return value 'integer()' was not assigned to 'ret'. This is fixed now in subversion on r-forge and will find its way to CRAN during the next week.

>Also, there doesn't seem to be a consistent way to return a data.frame with zero rows i.e. d[0,] returns a ffdf whereas d[1,] returns a data.frame

The documentation says "ff index expressions do not allow zeros and NAs" and trying to use a zero integer subscript reminds you

> c[0,]
Fehler in as.hi.integer(as.integer(x), ...) :
  0s and mixed positive/negative subscripts not allowed

ff allows to use 'integer()' as an integer representation of an empty subscript, look at

> c[integer(),]
[1] a b
<0 Zeilen> (oder row.names mit Länge 0)

> str(c[integer(),])
'data.frame':   0 obs. of  2 variables:
 $ a: int
 $ b: int


Kind regards


Jens Oehlschlägel 



More information about the R-sig-hpc mailing list