Get parent/ancestor environment
Get parent/ancestor environment
parenv(env = parent.frame(), n = 1)
env |
an environment |
n |
number of parents to go up |
adder <- function(x) function(y) x + y add2 <- adder(2) parenv(add2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.