Jason Watts <jcwatts999 <at> yahoo.com> writes: > > I'm looking for a function that returns the time at which a permanently stored version of a dataset (object) > was last modified, just like dataset.date in S-Plus. Any suggestions?
I think others have already answered this (i.e. R does not store objects in files so you can't get the dates of those files); however, if its only specific objects whose dates you need and you are willing to set them yourself you could do something like this: # create object and set timestamp in an attribute df <- data.frame(a=1:5,b=letters[1:5]) attr(df,"timestamp") <- Sys.time() # ... # update object and timestamp df$a <- df$a+1 attr(df,"timestamp") <- Sys.time() # ... # show last modified time attr(df,"timetamp") You could get much fancier by creating a class which automatically appends and updates timestamps whenever an operation is performed on its objects. That would be even easier to use but it would be more work to set up initially. ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
