matchr
Pattern Matching and Enumerated Types in R
Description
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.
Downloads
247
Last 30 days
18059th
656
Last 90 days
2.9K
Last year
Trend: +18.8% (30d vs prior 30d)
CRAN Check Status
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | NOTE |
| r-devel-linux-x86_64-debian-gcc | NOTE |
| r-devel-linux-x86_64-fedora-clang | NOTE |
| r-devel-linux-x86_64-fedora-gcc | NOTE |
| r-devel-macos-arm64 | NOTE |
| r-devel-windows-x86_64 | NOTE |
| r-oldrel-macos-arm64 | NOTE |
| r-oldrel-macos-x86_64 | NOTE |
| r-oldrel-windows-x86_64 | NOTE |
| r-patched-linux-x86_64 | NOTE |
| r-release-linux-x86_64 | NOTE |
| r-release-macos-arm64 | NOTE |
| r-release-macos-x86_64 | NOTE |
| r-release-windows-x86_64 | NOTE |
Check details (16 non-OK)
CRAN incoming feasibility
Maintainer: ‘Christopher Mann <cmann3@unl.edu>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Christopher",
family = "Mann",
role = c("aut", "cre"),
email = "cmann3@unl.edu")
as necessary.
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
CRAN incoming feasibility
Maintainer: ‘Christopher Mann <cmann3@unl.edu>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Christopher",
family = "Mann",
role = c("aut", "cre"),
email = "cmann3@unl.edu")
as necessary.
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Check History
NOTE 0 OK · 14 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
CRAN incoming feasibility
Maintainer: ‘Christopher Mann <cmann3@unl.edu>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Christopher",
family = "Mann",
role = c("aut", "cre"),
email = "cmann3@unl.edu")
as necessary.
CRAN incoming feasibility
Maintainer: ‘Christopher Mann <cmann3@unl.edu>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Christopher",
family = "Mann",
role = c("aut", "cre"),
email = "cmann3@unl.edu")
as necessary.
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^
Rd files
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
| ^