[R] small object but huge RData file exported

Jinsong Zhao j@zh@o @end|ng |rom ye@h@net
Wed Oct 20 14:57:23 CEST 2021

Hi there,

I have a RData file that is obtained by save.image() with size about 
74.0 MB (77,608,222 bytes).

When load into R, I measured the size of each object with object.size():

> object.size(combn.rda.m)
105448 bytes
> object.size(cross)
102064 bytes
> object.size(denitr.1)
25032 bytes
> object.size(rda.denitr.1)
600280 bytes
> object.size(xh)
7792 bytes
> object.size(xh.x)
6064 bytes
> object.size(xh.x.1)
24144 bytes
> object.size(xh.x.2)
24144 bytes
> object.size(xh.x.3)
24144 bytes
> object.size(xh.y)
2384 bytes

There are all small objects.

If I delete the largest one "rda.denitr.1", and save.image("xx.RData"). 
It has the size of 22.6 KB (23,244 bytes). All seem OK.

However, when I save(rda.denitr.1, file = "yy.RData"), then it has the 
size of 73.9 MB (77,574,869 bytes).

I don't know why...

Any hint?

Best wishes,


More information about the R-help mailing list