parenv: Get parent/ancestor environment

View source: R/parenv.r

parenvR 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)

pryr documentation built on Jan. 18, 2023, 1:08 a.m.