assign {base} | R Documentation |
assign(x, value, pos = -1, envir = sys.frame(sys.parent()),
inherits = FALSE, immediate = TRUE)
x |
a variable name (given as a quoted string). |
value |
a value to be assigned to |
pos |
??? |
envir |
the environent in which to assign. The default is the
environment where the call to |
inherits |
should the enclosing frames of the environment be inspected? |
immediate |
an ignored compatibility feature. |
This function is invoked for its side effect, which is assigning
value
to the variable x
. If no envir
is
specified, then the assignment takes place in the currently active
environment.
If inherits
is TRUE
, parents of the supplied
environment are searched until the variable x
is encountered.
The value is then assigned in the environment in which the variable is
encountered. If the symbol is not encountered then assignment takes
place in the global environment.
If inherits
is FALSE
, assigment takes place in the
initial frame of envir
.