[R] Problem with file size

Benilton Carvalho bcarvalh at jhsph.edu
Tue Nov 14 04:50:48 CET 2006


Hi everyone,

I have 2 environments (2 different R sessions) as described below:

Session 1:

Name of the environment: "CrlmmInfo"
Objects in the environment:
    index1: logical index - length 238304
    index2: logical index - length 238304
    priors: list of 4 - (matrix 6x6, 2 vectors of length 6, vector of  
length 2) - all num
    params: list of 4:
          centers [238304 x 3 x 2]: num
          scales [238304 x 3 x 2]: num
          N [238304 x 3]: num
          f0 [scalar]: num

If I save this environment to a file, I get a file of 23MB. Great.

Session 2:
     Analogous to "Session 1", but replace 238304 by 262264.

If I save the environment on Session 2, I get a file of 8.4GB.

I applied object.size on each of the objects in each environment, and  
this is what I got:

For Session 1:
index1: 16204864
index2: 16204864
priors: 3336
params: 74353584

For Session 2:
index1: 1049096
index2: 1049096
priors: 3336
params: 81829104

Is this increase from 23MB to 8.4GB expected to happen?

Benilton

sessionInfo() on both sessions is identical:

 > sessionInfo()
R version 2.4.0 (2006-10-03)
x86_64-unknown-linux-gnu

locale:
LC_CTYPE=en_US.iso885915;LC_NUMERIC=C;LC_TIME=en_US.iso885915;LC_COLLATE 
=en_US.iso885915;LC_MONETARY=en_US.iso885915;LC_MESSAGES=en_US.iso885915 
;LC_PAPER=en_US.iso885915;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASU 
REMENT=en_US.iso885915;LC_IDENTIFICATION=C

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

 > version
                _
platform       x86_64-unknown-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          2
minor          4.0
year           2006
month          10
day            03
svn rev        39566
language       R
version.string R version 2.4.0 (2006-10-03)



More information about the R-help mailing list