[R] increase or decrease variable by 1
ggrothendieck at gmail.com
Tue Dec 7 18:42:19 CET 2010
On Tue, Dec 7, 2010 at 12:25 PM, Bert Gunter <gunter.berton at gene.com> wrote:
> Inline below...
> On Tue, Dec 7, 2010 at 8:42 AM, Ted Harding <ted.harding at wlandres.net> wrote:
>> x <- x + 1
>> (and being generous with unnecessary spaces) uses 10 characters.
>> (being mean with them) uses 9. The "mean" version of the first
>> uses only 6: x<-x+1
>> However, I suppose there is merit in the spiritual exercise
>> of contemplating how `+`(x)<-1 gets worked out!
> AFAICS it doesn't.
> Error in +x <- 1 : could not find function "+<-"
Sorry, my code was missing the first line:
> `+<-` <- `+`
> x <- 3
> `+`(x) <- 1
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
email: ggrothendieck at gmail.com
More information about the R-help