Skip to content

Dating Objects

3 messages · Jason Skelton, Paul Roebuck, David Whiting

#
Hi

I know this subject has been mentioned before but from the mail archives 
I'm under the impression that this is not possible ?
I'm trying to carryout the equivalent of ls -l in R to give some 
date/time label to each of my objects

If the case is that there is no equivalent, is it possible to list all 
objects in an environment that share a common component ?
So that the common component is also displayed ?

I'm attempting to do the following

object$time <- Sys.time() for every object i've created
which although tedious appears to work

However I've no idea how if it is possible to list all the objects by $time
or extract the object name & $ time from all objects simultaneously so I 
can compare them.
Or am I just wasting my time ?

Apologies but my knowledge of R is limited at best ;-(
Any help would be fantastic and greatfully received

Cheers

Jason
#
On Fri, 12 Aug 2005, Jason Skelton wrote:

            
Not really following why you want to do this so it's
hard to suggest something. Were you attempting to track
mtime or ctime?

Perhaps instead you could describe the larger problem
you're trying to solve so there's more context to work
with.
Most of us probably are...

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)
#
Hi Jason,

Perhaps you get do what you want to do using attributes? Does this get
close to what you need?
[1] "2005-08-12 16:46:47 BST"
+   x.attr <- attributes(get(x))
+   attr.names <- names(attributes(get(x)))
+   if (!is.null(attr.names) && attr.names %in% "time") {
+     x.time <- x.attr$time
+     names(x.time) <- x
+     x.time
+   }
+ }
[[1]]
NULL

[[2]]
NULL

[[3]]
                       yy
"2005-08-12 16:46:47 BST"

[[4]]
                       zz
"2005-08-12 16:46:47 BST"


Dave
Jason Skelton wrote: