Package: matchingR 2.0.0

matchingR: Matching Algorithms in R and C++

Computes matching algorithms quickly using Rcpp. Implements the Gale-Shapley Algorithm to compute the stable matching for two-sided markets, such as the stable marriage problem and the college-admissions problem. Implements Irving's Algorithm for the stable roommate problem. Implements the top trading cycle algorithm for the indivisible goods trading problem.

Authors:Jan Tilly [aut, cre], Nick Janetos [aut]

matchingR_2.0.0.tar.gz
matchingR_2.0.0.zip(r-4.7)matchingR_2.0.0.zip(r-4.6)matchingR_2.0.0.zip(r-4.5)
matchingR_2.0.0.tgz(r-4.6-x86_64)matchingR_2.0.0.tgz(r-4.6-arm64)matchingR_2.0.0.tgz(r-4.5-x86_64)matchingR_2.0.0.tgz(r-4.5-arm64)
matchingR_2.0.0.tar.gz(r-4.7-arm64)matchingR_2.0.0.tar.gz(r-4.7-x86_64)matchingR_2.0.0.tar.gz(r-4.6-arm64)matchingR_2.0.0.tar.gz(r-4.6-x86_64)
matchingR_2.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
matchingR/json (API)
NEWS

# Install 'matchingR' in R:
install.packages('matchingR', repos = c('https://jtilly.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/jtilly/matchingr/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

7.18 score 51 stars 2 packages 50 scripts 383 downloads 18 exports 2 dependencies

Last updated from:fcb7947d50. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK147
linux-devel-x86_64OK163
source / vignettesOK184
linux-release-arm64OK141
linux-release-x86_64OK125
macos-release-arm64OK148
macos-release-x86_64OK380
macos-oldrel-arm64OK148
macos-oldrel-x86_64OK478
windows-develOK141
windows-releaseOK207
windows-oldrelOK127
wasm-releaseOK123

Exports:cpp_wrapper_galeshapleycpp_wrapper_galeshapley_check_stabilitycpp_wrapper_ttccpp_wrapper_ttc_check_stabilitygaleShapley.checkPreferencesgaleShapley.checkStabilitygaleShapley.collegeAdmissionsgaleShapley.marriageMarketgaleShapley.validaterankIndexroommateroommate.checkPreferencesroommate.checkStabilityroommate.validatesortIndexsortIndexOneSidedtoptradingtoptrading.checkStability

Dependencies:RcppRcppArmadillo

Matching Algorithms in R and C++: An Introduction to matchingR

Rendered frommatchingR-intro.Rmdusingknitr::rmarkdownon May 07 2026.

Last update: 2024-09-19
Started: 2015-05-18

Readme and manuals

Help Manual

Help pageTopics
C++ wrapper for Gale-Shapley Algorithmcpp_wrapper_galeshapley
C++ Wrapper to Check Stability of Two-sided Matchingcpp_wrapper_galeshapley_check_stability
Computes a stable roommate matchingcpp_wrapper_irving
Check if a matching solves the stable roommate problemcpp_wrapper_irving_check_stability
Computes the top trading cycle algorithmcpp_wrapper_ttc
Check if a one-sided matching for the top trading cycle algorithm is stablecpp_wrapper_ttc_check_stability
Check if preference order is completegaleShapley.checkPreferences
Check if a two-sided matching is stablegaleShapley.checkStability
Gale-Shapley Algorithm: College Admissions ProblemgaleShapley.collegeAdmissions
Gale-Shapley Algorithm: Stable Marriage ProblemgaleShapley galeShapley.marriageMarket
Input validation of preferencesgaleShapley.validate
Rank elements within column of a matrixrankIndex
Repeat each column of a matrix n timesrepcol
Repeat each row of a matrix n timesreprow
Compute matching for one-sided marketsroommate
Check if preference order for a one-sided market is completeroommate.checkPreferences
Check if a roommate matching is stableroommate.checkStability
Input validation for one-sided marketsroommate.validate
Sort indices of a matrix within a columnsortIndex
Ranks elements with column of a matrix, assuming a one-sided market.sortIndexOneSided
Compute the top trading cycle algorithmtoptrading
Check if there are any pairs of agents who would rather swap houses with each other rather than be with their own two current respective partners.toptrading.checkStability