[R-sig-hpc] ff package Help

Jens Oehlschlägel Jens.Oehlschlaegel at truecluster.com
Mon Mar 11 00:09:09 CET 2013


Hi Lucas,

the examples below give you an idea how to add a column to an ffdf.

library(ff)

# physically single columns
x<-ff(runif(10,0,1))
y<-ff(runif(10,-1,1))
z<-ff(runif(10,2,3))
fdata<-ffdf(x,y,z)
a <- clone(x)
fdata2 <- do.call("ffdf", c(physical(fdata), list(a=a)))

# physically combined columns
x<-ff(runif(10,0,1))
y<-as.ff(cbind(y=runif(10,-1,1), z=runif(10,2,3)))
fdata<-ffdf(x,y)
a <- clone(x)
fdata2 <- do.call("ffdf", c(physical(fdata), list(a=a)))
colnames(fdata2)[1:ncol(fdata)] <- colnames(fdata)

HTH

Jens



More information about the R-sig-hpc mailing list