[R] ff objects saving problem

Xiaobo Gu guxiaobo1982 at gmail.com
Wed Nov 10 14:11:51 CET 2010


Hi,
	I am running the examples in page 70 of the ff package document, but it failed with the following error
> cat("let's create some ff objects\n")
let's create some ff objects
> n <- 8e3
> a <- ff(sample(n, n, TRUE), vmode="integer", length=n, filename="d:/tmp/a.ff")
> b <- ff(sample(255, n, TRUE), vmode="ubyte", length=n, filename="d:/tmp/b.ff")
> x <- ff(sample(255, n, TRUE), vmode="ubyte", length=n, filename="d:/tmp/x.ff")
> y <- ff(sample(255, n, TRUE), vmode="ubyte", length=n, filename="d:/tmp/y.ff")
> z <- ff(sample(255, n, TRUE), vmode="ubyte", length=n, filename="d:/tmp/z.ff")
> df <- ffdf(x=x, y=y, z=z)
> rm(x,y,z)
> cat("save some of them with shorter relative pathnames ...\n")
save some of them with shorter relative pathnames ...
> ffsave(a, b, file="d:/tmp/y", rootpath="d:/tmp")
Error in system(cmd, input = list, intern = TRUE) : 'zip' not found
> str(ffinfo("d:/tmp/y"))
Error in system(cmd, intern = TRUE) : 'unzip' not found

Does it mean I have to install some special softwares for zip and unzip operation.


Another question is whether ff always create physical files for vectors, I found when a ff ffdf object is created, the number of physical files created is eaqual to the number of data frame columns.


Xiaobo.Gu



More information about the R-help mailing list