\Header{body}{Access to and Manipulation of the Body of a Function}
\alias{body$\leftarrow $}{body}
\keyword{programming}{body}
\begin{Usage}
\begin{verbatim}
body(fun=sys.function(sys.parent()))
body(obj) <- list
\end{verbatim}
\end{Usage}
\begin{Value}
If \texttt{fun} is a function then the body of that
function is returned.
If \texttt{fun} is a character string then the function with that name
is found and used.
If \texttt{fun} is not specified then the function calling \texttt{body}
is used.

The assignment form sets the body of a function \texttt{obj} to the
\texttt{list} on the right hand side.\end{Value}
\begin{SeeAlso}
\texttt{\Link{alist}}, \texttt{\Link{args}}, \texttt{\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}

