The goal of tinylens is to provide a minimal set of tools for working with lenses in R.
As of the initial release, this is basically a re-implementation of the
lenses package (https://github.com/cfhammill/lenses).
You can install the development version of tinylens from GitHub with:
# install.packages("pak")
# pak::pak("arbelt/tinylens")
install.packages("tinylens", repos = c('https://arbelt.r-universe.dev', 'https://cloud.r-project.org'))
The main benefit of lenses is that they are composable, and so allow for more streamlined transformations of nested data structures.
library(tinylens)
## basic example code