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'))
Datasets:

On CRAN:

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

1.78 score 2 packages 9 scripts 241 downloads 24 exports 1 dependencies

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

TargetResultLatest binary
Doc / VignettesOKJan 24 2025
R-4.5-winNOTEJan 24 2025
R-4.5-linuxNOTEJan 24 2025
R-4.4-winNOTEJan 24 2025
R-4.4-macNOTEJan 24 2025
R-4.3-winOKJan 24 2025
R-4.3-macOKJan 24 2025

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

Dependencies:rlang