\HeaderA{call}{Function Calls}{call}
\aliasA{as.call}{call}{as.call}
\aliasA{is.call}{call}{is.call}
\keyword{programming}{call}
\keyword{attribute}{call}
\begin{Description}\relax
Create or test for objects of mode \code{"call"}.
\end{Description}
\begin{Usage}
\begin{verbatim}
call(name, ...)
is.call(x)
as.call(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{name}] a character string naming the function to be called.
\item[\code{...}] arguments to be part of the call.
\item[\code{x}] an arbitrary \R{} object.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{call} returns an unevaluated function call, that is, an
unevaluated expression which consists of the named function applied to
the given arguments (\code{name} must be a quoted string which gives
the name of a function to be called).

\code{call} is a primitive, so the first argument (named or not) is
taken as \code{name} and the remaining arguments as arguments for the
constructed call: \code{call(x="c", 1,3, name="foo")} is a call to
\code{c} and not to \code{foo}.

\code{is.call} is used to determine whether \code{x} is a call (i.e.,
of mode \code{"call"}).
It is generic: you can write methods to handle
specific classes of objects, see \LinkA{InternalMethods}{InternalMethods}.

Objects of mode \code{"list"} can be coerced to mode \code{"call"}.
The first element of the list becomes the function part of the call,
so should be a function or the name of one (as a symbol; a quoted
string will not do).
\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{\LinkA{do.call}{do.call}} for calling a function by name and argument
list;
\code{\LinkA{Recall}{Recall}} for recursive calling of functions;
further
\code{\LinkA{is.language}{is.language}},
\code{\LinkA{expression}{expression}},
\code{\LinkA{function}{function}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
is.call(call) #-> FALSE: Functions are NOT calls

# set up a function call to round with argument 10.5
cl <- call("round", 10.5)
is.call(cl)# TRUE
cl
# such a call can also be evaluated.
eval(cl)# [1] 10
\end{ExampleCode}
\end{Examples}

