On Oct 20, 2011, at 16:50 , David Winsemius wrote: > That does seem to be an infelicity that ought to be fixed. Using the infix > addition operator does that same sort of coercions, so why would one expect > the infix multiplication operator to refuse to do it? > > > (sum(1000:1205))*(sum(1000:1204) +1205) > [1] 51581223225
The addition operator doesn't either: > (sum(1000:1205))*(sum(1000:1204) +1205L) [1] NA Warning message: In (sum(1000:1205)) * (sum(1000:1204) + 1205L) : NAs produced by integer overflow Beware that 1:1 is integer but 1 is not. -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-help@r-project.org 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.