It would be nice to have a date stamp on an object. In S/Splus this was always available, because objects were files. I have looked around, but I presume this information is not available. -------------------------------------------------------------------- Trevor Hastie hastie at stanford.edu Professor, Department of Statistics, Stanford University Phone: (650) 725-2231 (Statistics) Fax: (650) 725-8977 (650) 498-5233 (Biostatistics) Fax: (650) 725-6951 URL: http://www-stat.stanford.edu/~hastie address: room 104, Department of Statistics, Sequoia Hall 390 Serra Mall, Stanford University, CA 94305-4065
>>>>> "Trevor" == Trevor Hastie <hastie at stanford.edu> >>>>> on Tue, 13 Dec 2005 12:51:34 -0800 writes:Trevor> It would be nice to have a date stamp on an object. Trevor> In S/Splus this was always available, because objects were files. [are you sure about "always available"? In any case, objects were not single files anymore for a long time, at least for S+ on windows, and AFAIK also on unixy versions recently ] This topic has come up before. IIRC, the answer was that for many of us it doesn't make sense most of the time: If you work with *.R files ('scripts') in order to ensure reproducibility, you will rerun -- often source() -- these files, and the age of the script file is really more interesting. Also, I *always* use the equivalent of q(save = "no") and almost only use save() to particularly save the results of expensive computations {often, simulations}. Trevor> I have looked around, but I presume this information is not available. I assume you will get other answers, more useful to you, which will be based on a class of objects which carry an 'creation-time' attribute. Martin Maechler, ETH Zurich
This would be extraordinarily helpful, but I have not thought of a graceful way to do it. Everything in R now has a class attribute, but a timestamp for such simple things as vectors seems like overkill. On the other hand, those of us writing packages could implement this pretty easily for complex objects we produce. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ David W. Roberts office 406-994-4548 Professor and Head FAX 406-994-3190 Department of Ecology email droberts at montana.edu Montana State University Bozeman, MT 59717-3460 Trevor Hastie wrote:> It would be nice to have a date stamp on an object. > In S/Splus this was always available, because objects were files. > > I have looked around, but I presume this information is not available. > > -------------------------------------------------------------------- > Trevor Hastie hastie at stanford.edu > Professor, Department of Statistics, Stanford University > Phone: (650) 725-2231 (Statistics) Fax: (650) 725-8977 > (650) 498-5233 (Biostatistics) Fax: (650) 725-6951 > URL: http://www-stat.stanford.edu/~hastie > address: room 104, Department of Statistics, Sequoia Hall > 390 Serra Mall, Stanford University, CA 94305-4065 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >
Trevor Hastie <hastie at stanford.edu> wrote:> It would be nice to have a date stamp on an object. > In S/Splus this was always available, because objects were files.The "g.data" package on CRAN stores R objects in individual files, like the (old) S-Plus model. The timestamp on a file tells you the last time "g.data.save()" was invoked on that object. Its primary purpose is to make objects available (as promises) without filling up memory until an object is actually used. -- David Brahm (brahm at alum.mit.edu)