Package: lenses 0.0.3

lenses: Elegant Data Manipulation with Lenses

Provides tools for creating and using lenses to simplify data manipulation. Lenses are composable getter/setter pairs for working with data in a purely functional way. Inspired by the 'Haskell' library 'lens' (Kmett, 2012) <https://hackage.haskell.org/package/lens>. For a fairly comprehensive (and highly technical) history of lenses please see the 'lens' wiki <https://github.com/ekmett/lens/wiki/History-of-Lenses>.

Authors:Chris Hammill [aut, cre, trl], Ben Darwin [aut, trl]

lenses_0.0.3.tar.gz
lenses_0.0.3.zip(r-4.5)lenses_0.0.3.zip(r-4.4)lenses_0.0.3.zip(r-4.3)
lenses_0.0.3.tgz(r-4.4-any)lenses_0.0.3.tgz(r-4.3-any)
lenses_0.0.3.tar.gz(r-4.5-noble)lenses_0.0.3.tar.gz(r-4.4-noble)
lenses_0.0.3.tgz(r-4.4-emscripten)lenses_0.0.3.tgz(r-4.3-emscripten)
lenses.pdf |lenses.html
lenses/json (API)

# Install 'lenses' in R:
install.packages('lenses', repos = c('https://cfhammill.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/cfhammill/lenses/issues

On CRAN:

functional-programming

4.75 score 27 stars 42 scripts 156 downloads 53 exports 8 dependencies

Last updated 6 years agofrom:50390188ef. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 24 2024
R-4.5-winOKOct 24 2024
R-4.5-linuxOKOct 24 2024
R-4.4-winNOTEOct 24 2024
R-4.4-macNOTEOct 24 2024
R-4.3-winNOTEOct 24 2024
R-4.3-macNOTEOct 24 2024

Exports:%.%%>%attr_lattributes_lbody_lc_lclass_lcolnames_lcols_lcond_ildiag_ldim_ldimnames_ldrop_while_ilenv_lfilter_ilfilter_lfirst_lformals_lid_lindexindex_lindexesindexes_llast_llenslevels_llower_tri_lmap_lnames_loscopeoverover_mapover_withreshape_lrev_lrownames_lrows_lselect_lsendsend_oversetslab_lslice_lslot_lt_ltake_ltake_while_ilto_ltranspose_lunlist_lupper_tri_lview

Dependencies:cligluelifecyclemagrittrrlangtidyselectvctrswithr

Readme and manuals

Help Manual

Help pageTopics
Compose lenses%.%
Construct a lens into an attributeattr_l
Attributes lensattributes_l
Body lensbody_l
Convenient lens compositionc_l
Class lensclass_l
A lens into the column names of an objectcolnames_l
Column lenscols_l
Conditional lenscond_il
Lens into the diagonal of a matrixdiag_l
Dims lensdim_l
Dimnames lensdimnames_l
Conditional trim lensdrop_while_il
Environment lensenv_l
Filter lensfilter_il
Filter lensfilter_l
A lens into the first elementfirst_l
Formals lensformals_l
The identity (trivial lens)id_l
Construct a lens into an index/nameindex index_l
Construct a lens into a subset of an objectindexes indexes_l
A lens into the last elementlast_l
Construct a lenslens
Levels lenslevels_l
Lens into lower diagonal elementslower_tri_l
Promote a lens to apply to each element of a listmap_l
A lens into the names of an objectnames_l
Bind data to a lensoscope
Map a function over a lensover
Map a function over a list lensover_map
Map a function over an in scope lensover_with
Lens into a new dimension(s)reshape_l
Reverse lensrev_l
A lens into the row names of an objectrownames_l
Row lensrows_l
Tidyselect elements by nameselect_l
Set one lens to the view of anothersend
Set one lens to the view of another (transformed)send_over
Modify data with a lensset
Slab lensslab_l
Slice lensslice_l
Slot lensslot_l
Matrix transpose lenst_l
Construct a lens into a prefix of a vectortake_l
Conditional head lenstake_while_il
Promote a function to a 'getter' lensto_l
Lens into a list of rowstranspose_l
Unlist lensunlist_l
Lens into upper diagonal elementsupper_tri_l
View data with a lensview