The R Project SVN R

Rev

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

Rev 59039 Rev 61168
Line 28... Line 28...
28
\examples{
28
\examples{
29
x <- airquality[, -1] # x is a regression design matrix
29
x <- airquality[, -1] # x is a regression design matrix
30
y <- airquality[,  1] # y is the corresponding response
30
y <- airquality[,  1] # y is the corresponding response
31
 
31
 
32
stopifnot(complete.cases(y) != is.na(y))
32
stopifnot(complete.cases(y) != is.na(y))
33
ok <- complete.cases(x,y)
33
ok <- complete.cases(x, y)
34
sum(!ok) # how many are not "ok" ?
34
sum(!ok) # how many are not "ok" ?
35
x <- x[ok,]
35
x <- x[ok,]
36
y <- y[ok]
36
y <- y[ok]
37
}
37
}
38
\keyword{NA}
38
\keyword{NA}