[R] attaching data to any object

Rajarshi Guha rxg218 at psu.edu
Mon Nov 10 17:39:29 CET 2003


On Mon, 2003-11-10 at 11:32, Uwe Ligges wrote:
> Rajarshi Guha wrote:
> 
> > Hi,
> >   is the following possible - in a given session I make a lot of objects
> > and save when exiting. Usually I note down seperately what each object
> > is about. Is it possible to attach data to any object which would
> > essentially be a short note explaining the meaning of it?
> 
> You can add an attribute as in:
> 
> x <- 1:10
> attributes(x) <- list(my.note = "This is a test")
> 
> but I think it is not really what you are going to do...

The comment function does what I wanted

-------------------------------------------------------------------
Rajarshi Guha <rxg218 at psu.edu> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
A meeting is an event at which the minutes are kept and the hours are
lost.




More information about the R-help mailing list