Description Usage Arguments Examples
Leverages makeActiveBinding() by allowing parametrized functions that take the name of the binding and an arbitrary number of additional arguments.
1 2 3 4 | create_env(names, fun, ..., .envir = parent.frame(),
.enclos = parent.frame())
populate_env(env, names, fun, ..., .envir = parent.frame())
|
names |
A name, or a list of names, or a character vector; in the latter case the names are mangled if they are not representable in the native encoding |
fun |
A function with at least one argument, which will be called
to compute the value of a binding. The function will be called with the
binding name as first argument (unnamed), and |
... |
Additional arguments to |
.envir |
The environment in which |
.enclos |
The enclosing environment ( |
env |
An environment |
1 2 3 4 5 6 7 | env <- create_env(letters, paste0, "-lowercase")
env$a
env$c
env$Z
populate_env(env, LETTERS, paste0, "-uppercase")
env$a
env$Z
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.