within.environment | R Documentation |
within
methods for R environmentswithin
methods for R environments
## S3 method for class 'environment' within(data, expr, ..., quote = substitute(expr)) ## S3 method for class 'character' within( data, expr, ..., pos = 2L, warn.conflicts = TRUE, mask.ok = NULL, quote = substitute(expr) )
data |
An R environment, or the name of a (potentially new) attached environment. |
expr |
The bare R expression to evaluate. Automatically quoted. |
... |
Ignored. Added for compatibility with the S3 generic. Throws an
error if any arguments are passed to |
quote |
An R language object. This is an escape hatch from the automatic
quoting of |
pos |
The position where to attach the environment, if creating a new
one. If an environment of |
warn.conflicts |
logical. If TRUE (the default), print warnings about objects in the attached environment that that are masking or masked by other objects of the same name. |
mask.ok |
character vector of names of objects that can mask objects on
the search path without signaling a warning if |
The only difference between attach_eval
and within.character
is
the order of the arguments and the return value; the first
returns the result of evaluating the expression, the latter the
environment.
The R environment, invisibly.
See the note in attach_source
about a potential pitfall of evaluating
code directly in an attached environment.
attach_eval attach_source eval within
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.