parenv: Get parent/ancestor environment

Description Usage Arguments Examples

View source: R/parenv.r

Description

Get parent/ancestor environment

Usage

1
parenv(env = parent.frame(), n = 1)

Arguments

env

an environment

n

number of parents to go up

Examples

1
2
3
adder <- function(x) function(y) x + y
add2 <- adder(2)
parenv(add2)

hadley/pryr documentation built on Feb. 20, 2018, 6:11 a.m.