\HeaderA{complete.cases}{Find Complete Cases}{complete.cases}
\keyword{NA}{complete.cases}
\keyword{logic}{complete.cases}
\begin{Description}\relax
Return a logical vector indicating which cases are complete, i.e.,
have no missing values.
\end{Description}
\begin{Usage}
\begin{verbatim}
complete.cases(...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] a sequence of vectors, matrices and data frames.
\end{ldescription}
\end{Arguments}
\begin{Value}
A logical vector specifying which observations/rows have no missing
values across the entire sequence.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{is.na}{is.na}},
\code{\LinkA{na.omit}{na.omit}},
\code{\LinkA{na.fail}{na.fail}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- airquality[, -1] # x is a regression design matrix
y <- airquality[,  1] # y is the corresponding response

stopifnot(complete.cases(y) != is.na(y))
ok <- complete.cases(x,y)
sum(!ok) # how many are not "ok" ?
x <- x[ok,]
y <- y[ok]
\end{ExampleCode}
\end{Examples}

