From h.wickham at gmail.com  Mon Feb  4 16:57:07 2008
From: h.wickham at gmail.com (hadley wickham)
Date: Mon, 4 Feb 2008 09:57:07 -0600
Subject: [Rd] a != a*1 != a+0 != +a
In-Reply-To: <AE7B33FB-AFBC-40BD-9503-5C25ACFD4E23@noc.soton.ac.uk>
References: <AE7B33FB-AFBC-40BD-9503-5C25ACFD4E23@noc.soton.ac.uk>
Message-ID: <f8e6ff050802040757t5569dea3tdbe22a8d28e5b76b@mail.gmail.com>

> 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.

Hadley

-- 
http://had.co.nz/



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