Skip to contents

Lifecycle: experimental R-CMD-check Codecov test coverage

Universe MIT license GitHub contributors

Helper functions for use of hash-based matching (HBM) for pseudo-random number generation (PRNG) in stochastic simulations. HBM-PRNG is an approach to simplify matching synthetic experiment samples, which ensures that matched runs different only in the focal parameters, not in their chance events.

Getting started and learning more

This README is a good place to get started with hashprng, in particular the following installation and quick start sections. As you make use of the package, or if your problem requires a richer feature set than presented here, we also provide a range of other reosources.

  • Package website: This includes a function reference, model outline, and case studies making use of the package. This site refers to the release version of our package. The development version of our documentation (corresponding to our main branch on GitHub) is available here.


Installing the package

Install the development version (whilst we strive to limit breaking changes or the introduction of bugs during development this version may contain both) from GitHub using the following,

remotes::install_github("epinowcast/hashprng", dependencies = TRUE)

Quick start

In this quick start …


If you use hashprng in your work, please consider citing it using the following,

#> Warning in citation("hashprng"): could not determine year for 'hashprng' from
#> package DESCRIPTION file
#> To cite package 'hashprng' in publications use:
#>   Pearson C (????). _hashprng: Hash-Based Matching Pseudo-Random Number
#>   Generation_. R package version
#> A BibTeX entry for LaTeX users is
#>   @Manual{,
#>     title = {hashprng: Hash-Based Matching Pseudo-Random Number Generation},
#>     author = {Carl Pearson},
#>     note = {R package version},
#>   }

How to make a bug report or feature request

Please briefly describe your problem and what output you expect in an issue. If you have a question, please don’t open an issue. Instead, ask on our Q and A page. See our contributing guide for more information.


We welcome contributions and new contributors! We particularly appreciate help on priority problems in the issues. Please check and add to the issues, and/or add a pull request. See our contributing guide for more information.

Code of Conduct

Please note that the hashprng project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.