[R] Redefining reference class makes persistent object partly unreadable

Ross Boylan ross at biostat.ucsf.edu
Sat Jul 26 02:11:17 CEST 2014

A bunch of .rdata is on the disk, created from reference classes (as in
setRefClass()).  I redefined some of the classes--not by much.  Now when
I read in the rdata it seems to have been damaged, because some parts
have "disappeared".  The data are generally a graph of objects, some of
which (e.g., lists) are conventional rather than reference classes.

The specific  part that I noticed disappearing was actually a list

The redefinition seemed quite minimal: no slots changed and the number
of methods did not change.  In some cases the name changed (from show to
summary) along with the definition, in other cases just the definition
of the function changed.

I've verified the crucial role of the code change by flipping between
different versions of the code.  R 3.0.3 on Debian GNU/Linux.

Context: I implemented a bunch of show reference class methods to
display my results.  Now I want to display them in other forms, and so
am trying to shift to returning a summary object.

Ross Boylan

More information about the R-help mailing list