Other packages > Find by keyword >

matchr  

Pattern Matching and Enumerated Types in R
View on CRAN: Click here


Download and install matchr package within the R console
Install from CRAN:
install.packages("matchr")

Install from Github:
library("remotes")
install_github("cran/matchr")

Install by package version:
library("remotes")
install_version("matchr", "0.1.0")



Attach the package and use:
library("matchr")
Maintained by
Christopher Mann
[Scholar Profile | Author Map]
First Published: 2021-09-09
Latest Update: 2021-09-09
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.
How to cite:
Christopher Mann (2021). matchr: Pattern Matching and Enumerated Types in R. R package version 0.1.0, https://cran.r-project.org/web/packages/matchr. Accessed 03 May. 2025.
Previous versions and publish date:
No previous versions
Other packages that cited matchr R package
View matchr citation profile
Other R packages that matchr depends, imports, suggests or enhances
Complete documentation for matchr
Functions, R codes and Examples using the matchr R package
Some associated functions: Enum . Err . Match . Matchply . None . Ok . Option . Result . Some . Try . bang . enum_type . fallthrough . grapes-.-grapes . grapes-fn-grapes . into_option . into_result . is.enum . is.enum_type . is.err . is.none . is.ok . is.some . is.variant . match_cond . unwrap . variant . 
Some associated R codes: check.R . enum.R . fallthrough.R . fun.R . match.R . result_option.R . unwrap.R .  Full matchr package functions and examples
Downloads during the last 30 days
04/0304/0404/0504/0604/0704/0804/0904/1004/1104/1204/1304/1404/1504/1604/1704/1804/1904/2004/2104/2204/2304/2404/2504/2604/2704/2804/2904/3005/01Downloads for matchr024681012141618202224TrendBars

Today's Hot Picks in Authors and Packages

ENMTools  
Analysis of Niche Evolution using Niche and Distribution Models
Constructing niche models and analyzing patterns of niche evolution. Acts as an interface for many ...
Download / Learn more Package Citations See dependency  
ncvreg  
Regularization Paths for SCAD and MCP Penalized Regression Models
Fits regularization paths for linear regression, GLM, and Cox regression models using lasso or nonc ...
Download / Learn more Package Citations See dependency  
noisyCE2  
Cross-Entropy Optimisation of Noisy Functions
Cross-Entropy optimisation of unconstrained deterministic and noisy functions illustrated in Rubins ...
Download / Learn more Package Citations See dependency  
r2resize  
In-Text Resize for Images, Tables and Fancy Resize Containers in 'shiny', 'rmarkdown' and 'quarto' Documents
Automatic resizing toolbar for containers, images and tables. Various resizable or expandable contai ...
Download / Learn more Package Citations See dependency  
cleanNLP  
A Tidy Data Model for Natural Language Processing
Provides a set of fast tools for converting a textual corpus into a set of normalized tables. Users ...
Download / Learn more Package Citations See dependency  
scModels  
Fitting Discrete Distribution Models to Count Data
Provides functions for fitting discrete distribution models to count data. Included are the Poisson ...
Download / Learn more Package Citations See dependency  

24,187

R Packages

207,311

Dependencies

65,312

Author Associations

24,143

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA