\Header{na.fail}{Handle Missing Values in Data Frames}
\alias{na.omit}{na.fail}
\keyword{NA}{na.fail}
\begin{Usage}
\begin{verbatim}
na.fail(frame)
na.omit(frame)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{frame}] a data frame
\end{ldescription}
\end{Arguments}
\begin{Description}
These functions are useful for dealing with \texttt{\Link{NA}}s in data frames.
\texttt{na.fail} returns the data frame if it does not contain any
missing values, and signals an error otherwise.
\texttt{na.omit} returns the data frame with incomplete cases removed.\end{Description}
\begin{SeeAlso}
\texttt{\Link{na.action}}, \texttt{\Link{options}(na.action=..)} for setting ``NA
actions'', and \texttt{\Link{lm}} and \texttt{\Link{glm}} for functions
using these.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
DF <- data.frame(x = c(1, 2, 3), y = c(0, 10, NA))
na.omit(DF)
na.fail(DF)#> Error: missing values in ..

options("na.action")
\end{ExampleCode}
\end{Examples}

