[R] na.omit
buerkle@hawaii.edu
buerkle at hawaii.edu
Mon Jul 17 16:48:09 CEST 2000
Why is it that when a vector contains no NAs, na.omit returns an empty
vector rather than the object/vector that was passed to it?
>na.omit(c(1,2,3,4))
numeric(0)
in contrast ...
>na.omit(c(1,2,3,NA))
[1] 1 2 3
attr(,"na.action")
[1] 4
attr(,"na.action")attr(,"class")
[1] "omit"
Thanks, Alex
---------------------------
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 1
minor 1.0
year 2000
month June
day 15
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list