parenv {pryr} | R Documentation |
Get parent/ancestor environment
Description
Get parent/ancestor environment
Usage
parenv(env = parent.frame(), n = 1)
Arguments
env |
an environment |
n |
number of parents to go up |
Examples
adder <- function(x) function(y) x + y
add2 <- adder(2)
parenv(add2)
[Package pryr version 0.1.6 Index]