\Header{missing}{Does a Formal Argument have a Value?}
\keyword{programming}{missing}
\begin{Description}\relax
\code{missing} can be used to test whether a value was specified
as an argument to a function.
The following example shows how a plotting function
can be written to work with either a pair of vectors
giving x and y coordinates of points to be plotted
or a single vector giving y values to be plotted
against their indexes.\end{Description}
\begin{Usage}
\begin{verbatim}missing(x)\end{verbatim}
\end{Usage}
\begin{SeeAlso}\relax
\code{\Link{substitute}} for argument expression;
\code{\Link{NA}} for ``missing values'' in data.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
myplot <- function(x,y) {
                if(missing(y)) {
                        y <- x
                        x <- 1:length(y)
                }
                plot(x,y)
        }
\end{ExampleCode}
\end{Examples}

