A lens version of purrr::pluck. Takes a series element indicators and creates a composite lens.

c_l(...)

Arguments

...

index vectors or lenses

Details

  • length one vectors are converted to index_l,

  • length one logical vectors and numeric vectors that are negative are converted to indexes_l,

  • larger vectors are converted to indexes_l,

  • lenses are composed as is.

See examples for more

Examples

view(iris, c_l("Petal.Length", 10:20, 3))
#> [1] 1.6
sepal_l <- index("Sepal.Length") view(iris, c_l(sepal_l, id_l, 3))
#> [1] 4.7