R-beta: odd result with sum?

Richard Lammers lammers at edac.sr.unh.edu
Fri Aug 22 14:46:56 CEST 1997


I am using R 0.49 and I did not see this in the archives:

Given sum() defaults to na.rm = FALSE, should both of these results be NA?

> sum(c(1,NA))
[1] NA
> sum(c(NA,1))
[1] 0


--

Richard Lammers                  Phone: (603) 862-4699
Complex System Research Center     Fax: (603) 862-0188
University of New Hampshire      email: Richard.Lammers at unh.edu
Durham, NH  03824 (USA)            URL: http://pyramid.sr.unh.edu/~lammers


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the R-help mailing list