You can use attributes:

attributes(x) <- list(CreateDate = Sys.time(), User = Sys.info()['user'])


On Tue, Nov 9, 2010 at 8:36 AM, Tal Galili <tal.gal...@gmail.com> wrote:

> Hello all,
>
> I recently discovered the "comment" command.
> I see it can only hold a vector of characters.
>
> Is there a way (or an alternative), to make it possible to have it keep a
> list?
> (for example, to keep different pieces of information like date of
> creation,
> information of each variable and so on)
>
> The closest solution I can think of is using 'names' on the vector, like
> this:
> x <- 1
> comment(x) <- letters
> names(comment(x)) <- LETTERS
> x
> comment(x)
>
>
> Any other suggestions?
> (or general best practices for the "comment" command ?)
>
> Thanks,
> Tal
>
> ----------------Contact
> Details:-------------------------------------------------------
> Contact me: tal.gal...@gmail.com |  972-52-7275845
> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
> www.r-statistics.com (English)
>
> ----------------------------------------------------------------------------------------------
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to