[Rd] a != a*1 != a+0 != +a

hadley wickham h.wickham at gmail.com
Mon Feb 4 16:57:07 CET 2008

> One issue is the behaviour of unary operators "+" and "-".
> If trim is TRUE, then  "a"   is one thing,  but "+a"  returns
> "trim(a)", which might be different.
> Also "1*a" would be different from "a" and "a+0"

I think this is ok.  In the ggplot2 package I use + to join together
multiple plots, where a + b != b + a, and a + b + c (sometimes) = a.
This doesn't seem to cause much confusion for users.



More information about the R-devel mailing list