Package: matchr 0.1.0

matchr: Pattern Matching and Enumerated Types in R

Inspired by pattern matching and enum types in Rust and many functional programming languages, this package offers an updated version of the 'switch' function called 'Match' that accepts atomic values, functions, expressions, and enum variants. Conditions and return expressions are separated by '->' and multiple conditions can be associated with the same return expression using '|'. 'Match' also includes support for 'fallthrough'. The package also replicates the Result and Option enums from Rust.

Authors:Christopher Mann <[email protected]>

matchr_0.1.0.tar.gz
matchr_0.1.0.zip(r-4.5)matchr_0.1.0.zip(r-4.4)matchr_0.1.0.zip(r-4.3)
matchr_0.1.0.tgz(r-4.4-any)matchr_0.1.0.tgz(r-4.3-any)
matchr_0.1.0.tar.gz(r-4.5-noble)matchr_0.1.0.tar.gz(r-4.4-noble)
matchr_0.1.0.tgz(r-4.4-emscripten)matchr_0.1.0.tgz(r-4.3-emscripten)
matchr.pdf |matchr.html
matchr/json (API)

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

Peer review:

Datasets:

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

24 exports 1.78 score 1 dependencies 2 dependents 9 scripts 168 downloads

Last updated 3 years agofrom:e28e696695. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 26 2024
R-4.5-winNOTESep 26 2024
R-4.5-linuxNOTESep 26 2024
R-4.4-winNOTESep 26 2024
R-4.4-macNOTESep 26 2024
R-4.3-winOKSep 26 2024
R-4.3-macOKSep 26 2024

Exports:%.%%fn%Enumenum_typeErrfallthroughinto_optioninto_resultis.enumis.enum_typeis.erris.noneis.okis.someis.variantMatchmatch_condMatchplyOkSomeTryunwrapunwrap_orvariant

Dependencies:rlang