Learn R Programming

lenses (version 0.0.3)

formals_l: Formals lens

Description

A lens equivalent of formals and formals<-, allowing you to change the formal arguments of a function. As with body_l you probably shouldn't use this.

Usage

formals_l

Arguments

Format

An object of class lens of length 2.

Examples

Run this code
# NOT RUN {
f <- function(x) x + y + 7
view(f, formals_l)

g <- set(f, formals_l, list(x = 1, y = 2))
g()
# }

Run the code above in your browser using DataLab