locals | R Documentation |
Return all symbols in the specified environment as list.
locals(without = c(), env = parent.frame())
without |
Character vector. Symbols from current env to exclude. |
env |
Environment to use. Defaults to the environment from which |
Specified environment as list (without the mentioned symbols).
f <- function() {
x <- 1
y <- 2
z <- 3
locals()
}
ret <- f()
stopifnot(identical(ret, list(z = 3, y = 2, x = 1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.