[R] RData size

array chip arrayprofile at yahoo.com
Wed Jan 5 01:19:30 CET 2011


Hi, I noticed a Rdata size issue that's puzzling to me. Attached find 2 example 
datasets in text file. Both are 100x5, so the sizes for both text file are the 
same. However, when I read them into R, the sizes are much different:

tt<-as.matrix(read.table("tt.txt",header=T,row.names=1))
save(tt,file='tt.RData')

tt.big<-as.matrix(read.table("tt.big.txt",header=T,row.names=1))
save(tt.big,file='tt.big.RData')

"tt.RData" is 2KB while "tt.big.RData" is 5KB. This is not a big deal with the 
example datasets, but my real datasets are much larger, the difference is 35MB 
vs. 1MB for the RData objects. 


The difference between the 2 datasets above is that "tt.big" is a smoothed 
version of "tt", so there are a lot less unique values in tt.big than tt, I 
guess this is the reason for the difference in sizes of RData objects, can 
anyone confirm? 


Thanks

John


      
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tt.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110104/787acba5/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tt.big.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110104/787acba5/attachment-0001.txt>


More information about the R-help mailing list