On Fri, 17 Nov 2006, Robin Hankin wrote: > > OK, I see. But in algebra the "+" symbol is special: it is reserved > exclusively for associative and commutative operations [thus a+b+c is > always well-defined]; perhaps the parser could fall in with this > convention? >
It's not so long ago that we had a proposal for "+" to implement a non-associative and non-commutative operation: "+.character" was going to be string concatenation. And as Peter pointed out, + is already non-associative under recycling rules. Type changes are also a problem: > as.integer(2^30)+as.integer(2^30)+1 [1] NA Warning message: NAs produced by integer overflow in: as.integer(2^30) + as.integer(2^30) > as.integer(2^30)+(as.integer(2^30)+1) [1] 2147483649 -thomas ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.