I hadn't seen 'comment' before, so don't take my suggestion as
authoritative. It looks useful, so I investigated a bit.
This technique seems to work and is (perhaps?) easier than names:
tlist <- list(a=c(1:3), b=7)
comment(x) <- unlist(sapply(tlist, as.character))
or in one line
comment
Look at the help page, the example does exactly this by putting a two
element vector of strings as comment.
Hope it helps
mario
On 09-Nov-10 11:36, Tal Galili wrote:
Hello all,
I recently discovered the "comment" command.
I see it can only hold a vector of chara
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 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 alternati
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 o
4 matches
Mail list logo