R6 objects are basically just environments, so they're probably pretty simple to save and restore (I haven't tested it out, though).
-Winston On Fri, Aug 1, 2014 at 4:00 PM, Gábor Csárdi <csardi.ga...@gmail.com> wrote: > On Fri, Aug 1, 2014 at 4:47 PM, Ross Boylan <r...@biostat.ucsf.edu> wrote: > [...] >> First, I'd like to understand more about exactly what is saved to disk >> for reference and other classes, in particular how much meta-information >> they contain. And my mental model for reference class persistence is >> clearly wrong, because in that model instances based on old definitions >> come back intact (albeit not with the new method definitions or other >> new slots), whereas mine seemed to come back damaged. >> >> Second, I'm still hoping for some elegant way around this problem (how >> to redefine classes and still use saved versions from older definitions) >> for the future, both with reference and regular classes. Or at least >> some rules about what changes, if any, are safe to make in class >> definitions after an instance has been persisted. >>> >> Third, if changes to R could make things better, I'm hoping some >> developers might take them up. I realize that is unlikely to happen, >> for many good reasons, but I can still hope :) > > I believe that the brand new R6 class system can do this. I mean your > saved instances from old classes will be read back properly, with the > old methods. They are on CRAN and also here if you want to experiment: > https://github.com/wch/R6 > > Best, > Gabor > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel