\Header{body}{Access to and Manipulation of the Body of a Function}
\alias{body<\Rdash}{body}
\keyword{programming}{body}
\begin{Description}\relax
Get or set the body of a function.\end{Description}
\begin{Usage}
\begin{verbatim}
body(fun = sys.function(sys.parent()))
body(fun) <- list
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{fun}] a function object or a character string naming the function
to be manipulated.
If not specified, the function calling \code{body} is used.
\item[\code{list}] a list of \R{} expressions.
\end{ldescription}
\end{Arguments}
\begin{Value}
\code{body} returns the body of the function specified.

The assignment form sets the body of a function to the list on the
right hand side.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{alist}},
\code{\Link{args}},
\code{\Link{function}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
body(body)
f <- function(x) x^5
body(f) <- expression(5^x)
f(3) # = 125
str(body(f))
\end{ExampleCode}
\end{Examples}

