From ligges at statistik.tu-dortmund.de  Fri Mar 23 19:32:40 2012
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Fri, 23 Mar 2012 19:32:40 +0100
Subject: [Rd] uncompressed saves warning
In-Reply-To: <4F6B1E5D.20305@yorku.ca>
References: <4F69DE6A.90701@yorku.ca>
	<4F6A0E64.5010603@statistik.tu-dortmund.de>
	<4F6B1E5D.20305@yorku.ca>
Message-ID: <4F6CC1C8.7060801@statistik.tu-dortmund.de>



On 22.03.2012 13:43, Michael Friendly wrote:
> 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?
>


Don't know, works for me with R-2.14.2 (at least with another object - I 
do noit have yours) but tested with R-2.14.2 and R-2.15.0 RC, I do not 
have an R-2.14.1 around any more.

Uwe


>  > 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
>  >
>



[Rd] uncompressed saves warning
Uwe Ligges