over_with {lenses}R Documentation

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

iris %>% over_with(id_l, ~ Sepal.Length)

[Package lenses version 0.0.3 Index]