Skip to content
Prev 11588 / 398502 Next

methods on missing data

On Wed, 6 Jun 2001 Maciej.Hoffman-Wecker at evotecoai.com wrote:

            
var() already has a na.rm option that does what you want
R> var(NA,na.rm=TRUE)
[1] NA
try() is a general solution to the problem of functions that must
sometimes be applied to invalid data without causing an error.  Unlike the
var(NA) case, hist(NA) can't really do anything useful so try() is a
reasonable solution.

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._