The R Project SVN R

Rev

Rev 59039 | Rev 88585 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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