\Header{deparse}{Expression Deparsing}
\keyword{programming}{deparse}
\keyword{manip}{deparse}
\keyword{data}{deparse}
\begin{Description}\relax
Turn unevaluated expressions into character strings.
\end{Description}
\begin{Usage}
\begin{verbatim}
deparse(expr, width.cutoff = 60,
        backtick = mode(expr) %in% c("call", "expression", "("))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{expr}] any \R{} expression.
\item[\code{width.cutoff}] integer in \eqn{[20, 500]}{} determining the cutoff
at which line-breaking is tried.
\item[\code{backtick}] logical indicating whether symbolic names should be
enclosed in backticks if they don't follow the standard syntax.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function turns unevaluated expressions (where \dQuote{expression}
is taken in a wider sense than the strict concept of a vector of mode
\code{"expression"} used in \code{\Link{expression}}) into character
strings (a kind of inverse \code{\Link{parse}}).

A typical use of this is to create informative labels for data sets
and plots.  The example shows a simple use of this facility.  It uses
the functions \code{deparse} and \code{substitute} to create labels
for a plot which are character string versions of the actual arguments
to the function \code{myplot}.

The default for the \code{backtick} option is not to quote single
symbols but only composite expressions. This is a compromise to
avoid breaking existing code.
\end{Details}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole.
\end{References}
\begin{SeeAlso}\relax
\code{\Link{substitute}},
\code{\Link{parse}},
\code{\Link{expression}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
require(stats)
deparse(args(lm))
deparse(args(lm), width = 500)
myplot <-
function(x, y)
    plot(x, y, xlab=deparse(substitute(x)),
        ylab=deparse(substitute(y)))
\end{ExampleCode}
\end{Examples}

