The R Project SVN R

Rev

Rev 88585 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 88585 Rev 88896
Line 59... Line 59...
59
\examples{
59
\examples{
60
DF <- data.frame(x = c(1, 2, 3), y = c(0, 10, NA))
60
DF <- data.frame(x = c(1, 2, 3), y = c(0, 10, NA))
61
na.omit(DF)
61
na.omit(DF)
62
m <- as.matrix(DF)
62
m <- as.matrix(DF)
63
na.omit(m)
63
na.omit(m)
64
stopifnot(all(na.omit(1:3) == 1:3))  # does not affect objects with no NA's
64
stopifnot(na.omit(1:3) == 1:3)  # does not affect objects with no NAs
65
try(na.fail(DF))   #> Error: missing values in ...
65
try(na.fail(DF))   #> Error: missing values in ...
66
 
66
 
67
options("na.action")
67
options("na.action")
68
}
68
}
69
\keyword{NA}
69
\keyword{NA}