Crandore Hub

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.

Versions across snapshots

VersionRepositoryFileSize
0.1.0 rolling linux/jammy R-4.5 matchr_0.1.0.tar.gz 108.2 KiB
0.1.0 rolling linux/noble R-4.5 matchr_0.1.0.tar.gz 108.0 KiB
0.1.0 rolling source/ R- matchr_0.1.0.tar.gz 26.1 KiB
0.1.0 latest linux/jammy R-4.5 matchr_0.1.0.tar.gz 108.2 KiB
0.1.0 latest linux/noble R-4.5 matchr_0.1.0.tar.gz 108.0 KiB
0.1.0 latest source/ R- matchr_0.1.0.tar.gz 26.1 KiB
0.1.0 2026-04-26 source/ R- matchr_0.1.0.tar.gz 26.1 KiB
0.1.0 2026-04-23 source/ R- matchr_0.1.0.tar.gz 26.1 KiB
0.1.0 2026-04-09 windows/windows R-4.5 matchr_0.1.0.zip 112.0 KiB
0.1.0 2025-04-20 source/ R- matchr_0.1.0.tar.gz 26.1 KiB

Dependencies (latest)

Depends