Description Usage Arguments Details Examples
Useful for debugging sessions.
1 | get_environment(which = 1, exclude = NULL)
|
which |
integer. the frame number in the call stack. |
exclude |
character. which arguments should be excluded? It is possible to exclude some variables by name. |
Returns all variables in a call environment. Made it possible with
sys.frames()
, which accesses to the environments in the call stack.
1 2 3 4 5 6 7 | ## Not run:
e <- function() {x<-"A";y<-rnorm(5);get_environment()};e()
## inline functions:
ei <- function() {x<-"A";y<-rnorm(5); function() {get_environment(2)}}
ei()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.