Skip to content

matchr

Pattern Matching and Enumerated Types in R

v0.1.0 · Sep 9, 2021 · MIT + file LICENSE

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

14 NOTE
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)
NOTE r-devel-linux-x86_64-debian-clang

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.
NOTE r-devel-linux-x86_64-debian-clang

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-devel-linux-x86_64-debian-gcc

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.
NOTE r-devel-linux-x86_64-debian-gcc

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-devel-linux-x86_64-fedora-clang

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-devel-linux-x86_64-fedora-gcc

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-devel-macos-arm64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-devel-windows-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-oldrel-macos-arm64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-oldrel-macos-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-oldrel-windows-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-patched-linux-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-release-linux-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-release-macos-arm64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-release-macos-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-release-windows-x86_64

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
NOTE r-devel-linux-x86_64-debian-clang

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.
NOTE r-devel-linux-x86_64-debian-gcc

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.
NOTE r-devel-linux-x86_64-fedora-clang

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-devel-linux-x86_64-fedora-gcc

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-devel-macos-arm64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-devel-windows-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-patched-linux-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-release-linux-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-release-macos-arm64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-release-macos-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-release-windows-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-oldrel-macos-arm64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-oldrel-macos-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTE r-oldrel-windows-x86_64

Rd files

checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies rlang refer matchr

Version History

new 0.1.0 Mar 10, 2026