An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110603/26f9112f/attachment.pl>
Notes on R Objects
5 messages · Matthew DeAngelis, David Winsemius, Gabor Grothendieck +1 more
On Jun 3, 2011, at 12:18 PM, Matthew DeAngelis wrote:
Hi all, Is there any way to add notes or comments to R objects? It can be hard for me to come up with a descriptive name that encapsulates all the differences between data sets, so it would be very helpful if I could add a note which described the object. I didn't find anything like this in the R docs.
?attributes ?attr
David Winsemius, MD West Hartford, CT
On Fri, Jun 3, 2011 at 12:18 PM, Matthew DeAngelis <ronin78 at gmail.com> wrote:
Hi all, Is there any way to add notes or comments to R objects? ?It can be hard for me to come up with a descriptive name that encapsulates all the differences between data sets, so it would be very helpful if I could add a note which described the object. ?I didn't find anything like this in the R docs.
Try comment:
DF <- data.frame(x = 1:2) comment(DF) <- "Hello" comment(DF)
[1] "Hello"
Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com
On Jun 3, 2011, at 12:18 PM, Matthew DeAngelis wrote:
Hi all, Is there any way to add notes or comments to R objects?
I just suggested attributes(), but then I remembered that there is a specific function named unsurprisingly: ?comment # a non-printed attribute Maybe you need to also learn some searching strategies to try before posting. I wouldn't have expected you to know the 'attributes' or 'attr' function names, but if you searched on just the words you were using you would have gotten useful results.
It can be hard for me to come up with a descriptive name that encapsulates all the differences between data sets, so it would be very helpful if I could add a note which described the object. I didn't find anything like this in the R docs.
David Winsemius, MD West Hartford, CT
On 04/06/11 04:18, Matthew DeAngelis wrote:
Hi all, Is there any way to add notes or comments to R objects? It can be hard for me to come up with a descriptive name that encapsulates all the differences between data sets, so it would be very helpful if I could add a note which described the object. I didn't find anything like this in the R docs.
?comment
cheers,
Rolf Turner