R-beta: odd result with sum?

Richard Lammers (lammers@edac.sr.unh.edu)
Fri, 22 Aug 1997 08:46:56 -0400 (EDT)


Date: Fri, 22 Aug 1997 08:46:56 -0400 (EDT)
From: Richard Lammers <lammers@edac.sr.unh.edu>
To: r-help@stat.math.ethz.ch
Subject: R-beta: odd result with sum?
Message-Id: <Pine.OSF.3.95.970822083827.2588L-100000@edac.sr.unh.edu>


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@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@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=