view {tinylens} | R Documentation |
view()
applies a lens to a data structure and returns the focused part.
set()
applies a lens to a data structure and sets the focused part.
over()
applies a lens to a data structure and modifies the focused part using a function.
view(d, l)
d |
The data structure to view |
l |
The lens to apply |
The part of the data structure focused by the lens
x <- 1:10
names(x) <- letters[1:10]
view(x, names_l)
set(x, names_l, LETTERS[1:10])
over(x, names_l, toupper)