[Rd] save() file size (PR#13816)

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jul 9 21:41:13 CEST 2009


The evidence contradicts this claim:

> object.size(x)
4666464 bytes
> object.size(y)
5812696 bytes

so 'y' is indeed larger than 'x' (and compresses less well).
Reason: 'x' has automatic row names and 'y' does not.

On Thu, 9 Jul 2009, Mike.Lawrence at dal.ca wrote:

> Full_Name: Mike Lawrence
> Version: 2.9.0
> OS: OS 10.5.7
> Submission from: (NULL) (208.98.203.100)
>
>
> When using save() I notice that sometimes saving smaller objects yield larger
> file sizes.
>
> x=data.frame(
> 	expand.grid(
> 		id=factor(1:1000)
> 		,trial=1:24
> 		,cue=factor(1:3)
> 		,flank=factor(1:4)
> 	)
> )
> save(x,file='temp1.Rdata') #about 20KB
> y=x[x$id!='1',]
> save(y,file='temp2.Rdata') #>500KB
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list