Skip to content

matchr

0.1.0Package record

Pattern Matching and Enumerated Types in R

1packages depend
3Kdownloads / year
–test coverage
0/13flavors OK

Overview

About

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.

Install

Health

CRAN checks
13NOTE
Check messages
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) Match.Rd:90: Lost braces; missing escapes or markup?
    90 | expression in braces. For example, the condition "{[ab]*}" is equivalent
       |                                                   ^
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
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 check page ↗

Slowest check: 1.1 min · r-oldrel-windows-x86_64
Status changes
  • NOTE13 NOTENow
  • NOTE14 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.1.0
READMENoVignettesNoNEWSNoCitation fileNoWebsitenot declared in DESCRIPTION
Help pages
27
Examples that run
100%23 run in a plain check
Exported functions with examples
96%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

3K
CRAN downloads in the past year
Rank #17,298 · ~8/day · ~249/mo
Daily download trend is not available in this view yet.
27330 days
74290 days
3K1 year
Compare downloads with other packages →
Also on66 r2u4 autocran

Dependencies

Declared dependencies
1 external dependency (excludes base and recommended)

Installing matchr adds 1 package (1 with compiled code, 766 KB of source tarballs). Heaviest: rlang 766 KB.

Depends (3)
R >= 3.5.0rlangutils
Imports (0)
none
LinkingTo (0)
none
Suggests (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (from the free-text Author field) (1)

Maintainer since 0.1.0 (2021)

Releases (1)
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 0.1.0Latest
    2021-09-09 · current release
  • R
    R 4.1.0 released · 2021-05-18

Package metadata

First published
2021-09-09
Total releases
1 / 5 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5.0
Bundled data
4.9 KB / 3 files
Download size
26 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("matchr")

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for matchr version 0.1.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy