Learn R Programming

lenses (version 0.0.3)

over_with: Map a function over an in scope lens

Description

Apply the specified function with named elements of the viewed data in scope. Similar to dplyr::mutate

Usage

over_with(d, l, f)

Arguments

d

the data

l

the lens

f

the function to use, potentially a ~ specified anonymous function. The function body is quoted, and evaluated with rlang::eval_tidy(..., data = view(d,l))

Examples

Run this code
# NOT RUN {
iris %>% over_with(id_l, ~ Sepal.Length)
# }

Run the code above in your browser using DataLab