
Standardise a probability distribution name
Source:R/epiparameter-utils.R
dot-clean_distribution_name.RdConverts a probability distribution name to the name used by
R, so that distributions can be given with any capitalisation and by their
full name as well as the R name. For example, "Negative binomial",
"negbinom" and "nbinom" all give "nbinom".
Details
Names are cleaned with .clean_string() before being matched, so
capitalisation, surrounding whitespace, and underscores or hyphens in place
of spaces are all accepted. Names that are not recognised as an alias are
returned cleaned but otherwise unchanged, leaving them to be validated by
the calling function.