Learn R Programming

lenses (version 0.0.3)

env_l: Environment lens

Description

A lens into the environment of an object. This is the lens version of environment and environment<-

Usage

env_l

Arguments

Format

An object of class lens of length 2.

Examples

Run this code
# NOT RUN {
x <- 10
f <- (function(){x <- 2; function() x + 1})()
f

f()
view(f, env_l)$x

g <- over(f, env_l, parent.env)
g()
# }

Run the code above in your browser using DataLab