Skip to content
Prev 82769 / 398506 Next

Age of an object?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Roger Bivand wrote:
Why not use a regular named vector/list rather than pasting things into
and then back from a string, relying on conventions and losing
information.

   current <- comment(obj)
   current[["timeStamp"]] <- Sys.time()
   comment(x) <- current

and then the individual elements can be accessed in the usual manner
   comment(x)[["timeStamp"]]
and the original value can be be maintained (with a little more
tinkering for old-style cases without named elements).
- --
Duncan Temple Lang                duncan at wald.ucdavis.edu
Department of Statistics          work:  (530) 752-4782
371 Kerr Hall                     fax:   (530) 752-7099
One Shields Ave.
University of California at Davis
Davis, CA 95616, USA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDoC4n9p/Jzwa2QP4RAiJUAJ9nCsmUSEuUwnssgwfcl+qdJ/oDlACeK6jw
r6QsjGFUtuPhKCd31dZX5Iw=
=jCmV
-----END PGP SIGNATURE-----