[R] How to know created time of object in R?

Patrick Connolly p_connolly at slingshot.co.nz
Tue Nov 6 20:44:16 CET 2007

On Tue, 06-Nov-2007 at 08:17AM -0200, Alberto Monteiro wrote:

|> Prof Brian Ripley wrote:
|> >
|> >> I would like to know the created time and date of specific object.
|> >> Is there any function for it?
|> > 
|> > There isn't even the concept.  Most objects in R are a collection of 
|> > SEXPRECs created at different times.  Suppose you create a data 
|> > frame out of existing columns, and then later change the names? What 
|> > does 'created' mean for the data frame?
|> > 
|> > In any case, none of the possibly relevant date-times is stored.
|> > 
|> I imagine that it could be possible to create a class that
|> would store the "creation time" of its objects... but I have
|> no idea how to do it (I think I could do it in C++, but I am
|> illiterate in R++ oops S4 classes).

I never use the comment for anything else, so it's simple enough to
store that information there.  In my case, I'm only interested in the
date which is interesting information when revisiting a project months
or years later.  As Brian indicated, it's not entirely predictable,
but it's good enough for my purposes.  I'm mostly interested in
various versions of functions or lists that they create.

   ___    Patrick Connolly   
 {~._.~}          		 Great minds discuss ideas    
 _( Y )_  	  	        Middle minds discuss events 
(:_~*~_:) 	       		 Small minds discuss people  
 (_)-(_)  	                           ..... Anon

More information about the R-help mailing list