Get distribution functions
Arguments
- dist
The target distribution function (e.g., norm, binom, gamma, truncnorm, likert). If the distribution isn't definited in the packages stats, truncnorm, or faux, use the format "package::dist".
Examples
qfunc <- distfuncs("norm")$q # returns qnorm
p <- seq(0.1, 0.9, .1)
qfunc(p) == qnorm(p)
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
rfunc <- distfuncs("norm")$r # returns rnorm
rfunc(n = 10, mean = 100, sd = 10)
#> [1] 94.72254 106.65762 95.43232 102.54102 89.62373 94.18951 90.68428
#> [8] 92.62492 99.91533 102.69976