oscope: Bind data to a lens

Description Usage Arguments Examples

Description

To flatten lens composition, you can prespecify the data the lens with be applied to by constructing an objectoscope. These can be integrated easily with normal data pipelines.

Usage

1
oscope(d, l = id_l)

Arguments

d

The data for interest

l

The lens to bind the data to. Defaults to the identity lens

Examples

1
2
3
4
5
list(a = 5, b = 1:3, c = 8) %>%
  oscope()   %.%
  index_l("b") %.%
  index_l(1)   %>%
  set(10)

cfhammill/focal documentation built on May 23, 2019, 6:04 p.m.