Is there any way to get an object created time?
Not usually, but you can do it for things you have created
R> Df & lt; - data.frame (a = sample (letter [1: 5], 10, true), b = runif (10)) r & gt; Attr (df, "created") & lt; - Sys.time () R & gt; DF A B1B 0.8437021 2D 0.8683446 3b 0.5194791 4b 0.0480405 5b 0.5604978 6c 0.1938154 7 A 0.1451077 8D 0.1785405 9 C 0.3937795 10b 0.2874135 R & gt; Str (df) 'data.frame': 10 Obs 2 variables: $ a: Factor w / 4 level "A", "B", "C", "D": 2 4 2 2 2 3 1 4 3 2 $ B: number 0.844 0.868 0.519 0.048 0.56 ... - attr (*, "createdAt") = POSIXct, format: "2011-03-16 10: 42: 10.137434" R & gt; And then you can write some custom print () or show () function that uses the feature frank Herrel and its design predecessor have done something like this for some time.
Comments
Post a Comment