Package: tinylens 0.1.0
tinylens: Minimal Implementation of Functional Lenses
Provides utilities to create and use lenses to simplify data manipulation. Lenses are composable getter/setter pairs that provide a functional approach to manipulating deeply nested data structures, e.g., elements within list columns in data frames. The implementation is based on the earlier 'lenses' R package <https://github.com/cfhammill/lenses>, which was inspired by the Haskell 'lens' package by Kmett (2012) <https://github.com/ekmett/lens>, one of the most widely referenced implementations of lenses. For additional background and history on the theory of lenses, see the 'lens' package wiki: <https://github.com/ekmett/lens/wiki/History-of-Lenses>.
Authors:
tinylens_0.1.0.tar.gz
tinylens_0.1.0.tar.gz(r-4.5-noble)tinylens_0.1.0.tar.gz(r-4.4-noble)
tinylens_0.1.0.tgz(r-4.4-emscripten)tinylens_0.1.0.tgz(r-4.3-emscripten)
tinylens.pdf |tinylens.html✨
tinylens/json (API)
NEWS
# Install 'tinylens' in R: |
install.packages('tinylens', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/arbelt/tinylens/issues
Last updated 14 days agofrom:fc280272ea. Checks:OK: 2. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Dec 10 2024 |
R-4.5-linux | OK | Dec 10 2024 |
Exports:%.%attr_lc_lfilter_ili_lid_lindex_lindices_llensmap_lnames_loverover_maprows_lselect_lsetslice_lvec_data_lviewwhere_il
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Compose two lenses | %.% |
Attributes lens | attr_l |
Lens for accessing and modifying nested elements of a list or vector | c_l |
Filter ilens | filter_il |
Identity lens | id_l |
Index lens | index_l |
Subset lens | indices_l i_l |
Create a lens | lens |
Lens into a list or vector | map_l |
Names lens | names_l |
Modify the focused part of a data structure | over |
Map a function over a list lens | over_map |
Rows lens | rows_l |
include verbs.R include lens.R Select lens | select_l |
Set the focused part of a data structure | set |
Slice lens | slice_l |
Vector data lens | vec_data_l |
View the focused part of a data structure | view |
Predicate ilens | where_il |