search for: name_of_th

Displaying 1 result from an estimated 1 matches for "name_of_th".

Did you mean: name_of_
2010 Nov 11
2
Adding meta-data when creating objects. e.g: changing "<-" so to (for example) add "creation time" - how-to and pros/cons?
My objective is to start having meta-data on objects that I create. For example, consider the following function: assign2 <- function(x, ...) { assign("x", ...) attr(x, "creation time") <- Sys.time() x <<- x } assign2("x", 1:4) "assign2" assigns to x the vector 1:4, and it then also adds the creation time of the object. (Hat tip goes to