Why does the object become different after saving / loading to / from RData?

I have a large ExpressionSet ( Bioconductor ) object named eset . Can you explain why this is happening? Why is the copy of the object not identical to the original after saving / loading?

 > e2=eset > identical(e2,eset) [1] TRUE > save(e2,file="test.RData") > rm(e2) > e2 # just to check the removal Error: object 'e2' not found > load("test.RData") > identical(e2,eset) [1] FALSE 

Are there other ways to verify the identity of two objects?

If necessary, I work with R 2.15.1 under Windows 7.

+4
source share
1 answer

Environments are one of several types of R objects (connections are others) for which saving and loading are not exact inversions.

 e <- new.env() f <- e identical(e,f) # [1] TRUE save("f", file="f.Rdata") rm(f) load("f.Rdata") identical(e,f) # [1] FALSE 

ExpressionSet contains the assayData slot, the assayData class, which is described as a "container class defined as a union of the list and environment class". Although eset is not installed on my computer, I would suggest that the assayData eset and e2 slots refer to different environments, forcing identical(eset, e2) return FALSE .

+7
source

All Articles