[Rd] comment propagation

From: Gabor Grothendieck <ggrothendieck_at_myway.com>
Date: Mon 04 Oct 2004 - 06:52:39 EST

Consider the following where we add a comment, "One", to the variable x. Then we create a transformation of x putting it in variable y and display y's comment. y's comment turns out to be the same as that of x.

> x <- 1
> comment(x) <- "One"
> y <- x + 1
> comment(y)
[1] "One"

It seems that Ops propagates the comment attribute. The problem is that if I have multiple variables and am tryng to remember which is which this will result in numerous copies of the comment preventing me from figuring out which is the real One. Every transformation of my original data will have the same comment.

I don't think this behavior is really desirable but does anyone have any perspective on this?

R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Oct 04 06:59:12 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:19 EST