Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

parenv

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

Tools for Computing on the Language

v0.1.4
GPL-2
Authors
Hadley Wickham [aut, cre], R Core team [ctb] (Some code extracted from base R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.