Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dpqrdist

Distribution wrapper


Description

Utility function wrapping up the d/p/q/r distribution functions

Usage

dpqrdist(dist, type = c("d", "p", "q", "r"), ...)

Arguments

dist

a character description of a distribution, for example "norm", "t", or "chisq"

type

one of "x", "p", "q", or "r"

...

additional arguments passed on to underlying distribution function. Note that one of d, p, q, or n must be a named argument in ...

Examples

# 3 random draws from N(1,2)
dpqrdist("norm", "r", n = 3, mean = 1, sd = 2)
# These should all be the same
dpqrdist("norm", "d", x = 0) == dnorm(x = 0)
dpqrdist("norm", "p", q = 0, mean = 1, sd = 2) == pnorm(q = 0, mean = 1, sd = 2)
dpqrdist("norm", "q", p = 0.5, mean = 1, sd = 2) == qnorm(p = 0.5, mean = 1, sd = 2)

mosaic

Project MOSAIC Statistics and Mathematics Teaching Utilities

v1.8.3
GPL (>= 2)
Authors
Randall Pruim [aut, cre], Daniel T. Kaplan [aut], Nicholas J. Horton [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.