Re: [R] once more: methods on missing data

About this list Date view Thread view Subject view Author view

From: Achim Zeileis (zeileis@ci.tuwien.ac.at)
Date: Fri 08 Jun 2001 - 01:39:09 EST


Message-ID: <3B1FA01D.4938EC6F@ci.tuwien.ac.at>


> The result of the call
>
> x <- as.numeric(c(NA,NA,NA)); STATISTIC(x[!is.na(x)])
>
> depends on the STATISTIC.
>
> STATISTIC RESULT
> min Inf and warning message
> max -Inf and warning message
> mean NaN and no warning message
> quantile named vector containing NAs and no warning message
> sd abortion of the evaluation with an error message

OK, now I see your problem. R 1.2.3 gives the following for your
example:

> sd(x[!is.na(x)])
Error in var(x, na.rm = na.rm) : `x' is emptyplatform
sparc-sun-solaris2.7

but this seems to be fixed in the current development version (the
forthcoming R 1.3.0)

> sd(x[!is.na(x)])
[1] NA

I'm not sure, what difference in the code is responsible for this but I
hope this helps. My respective systems are given below.
Achim

---------------------------
Achim Zeileis
Institut für Statistik
Technische Universität Wien

platform sparc-sun-solaris2.7
arch sparc
os solaris2.7
system sparc, solaris2.7
status
major 1
minor 2.3
year 2001
month 04
day 26
language R

platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status Under development (unstable)
major 1
minor 3.0
year 2001
month 03
day 20
language R
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:44 EST