[Rd] uncompressed saves warning

Michael Friendly friendly at yorku.ca
Thu Mar 22 13:43:09 CET 2012


On 3/21/2012 1:22 PM, Uwe Ligges wrote:
>> What is the equivalent R command to compress these files in my project
>> tree?
>>
>
> Michael,
>
> if you use
> R CMD build --resave-data
> to build the tar archive, the versions therein are recompressed.
But AFAIK, in StatET, R CMD build  builds a separate .tar.gz file under 
c:/eclipse, and does not affect
the project directory where these files are stored and sync'd with R-Forge.
>
> Otherwise, you can also open the files and resave them via save() and 
> appropriate arguments.
I exported the .rda files to c:/R/data and ran

 > load("gfrance.rda")
 > load("gfrance85.rda")
 > save(gfrance, file="gfrance.RData", compress="xz")
Error in xzfile(file, "wb", compression = 9) : cannot open the connection
In addition: Warning message:
In xzfile(file, "wb", compression = 9) :
   cannot initialize lzma encoder, error 5

Why doesn't this work?

 > save(gfrance, file="gfrance.RData", compress=TRUE)

The above works, but only compresses a 300K file to 299K
>
> Or use  resaveRdaFiles() in package tools to runn it on a whole folder 
> automatically.
>

 > sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United 
States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United 
States.1252

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  
methods   base

other attached packages:
[1] p3d_0.02-4       mgcv_1.7-13      car_2.0-12       nnet_7.3-1       
rgl_0.92.798     vcd_1.2-13       colorspace_1.1-1 MASS_7.3-17

loaded via a namespace (and not attached):
[1] lattice_0.20-6 Matrix_1.0-4   nlme_3.1-103   tools_2.14.1
 >

-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA



More information about the R-devel mailing list