1
1
% File src/library/base/man/body.Rd
2
2
% Part of the R package, http://www.R-project.org
3
% Copyright 1995-2007 R Core Development Team
3
% Copyright 1995-2008 R Core Development Team
4
4
% Distributed under GPL 2 or later
18
18
\item{fun}{a function object, or see \sQuote{Details}.}
19
19
\item{envir}{environment in which the function should be defined.}
20
\item{value}{an expression or a list of \R expressions.}
23
\code{body} returns the body of the function specified.
25
The replacement form sets the body of a function to the
26
expression/list on the right hand side, and (potentially) resets the
27
environment of the function.
20
\item{value}{an object, usually a language object: see section
30
24
For the first form, \code{fun} can be a character string
31
25
naming the function to be manipulated, which is searched for from the
33
If it is not specified, the function calling \code{body} is used.
26
parent environment. If it is not specified, the function calling
29
To set the value to a list call the replacement function with
30
\code{value} a length-one list containing the desired value.
33
\code{body} returns the body of the function specified. This is
34
normally a language object, most often a call to \code{\{}, but it can
35
also be an object (e.g. \code{pi}) to be the return value of the function.
37
The replacement form sets the body of a function to the
38
object on the right hand side, and (potentially) resets the
39
environment of the function. If \code{value} is of class
40
\code{"\link{expression}"} or a length-one list, the first
41
element is used as the body. For expressions (but not lists) any
42
additional elements are ignored, with a warning.
36
45
\code{\link{alist}},