View source: R/distributions.R
fit_distr | R Documentation |
Wrapper to fit a distribution to data. Currently implemented distributions
are the exponential distribution (exp
), the gamma distribution (gamma
)
and the von Mises distribution (vonmises
).
fit_distr(x, dist_name, na.rm = TRUE)
x |
|
dist_name |
|
na.rm |
|
An amt_distr
object, which consists of a list with the name
of
the distribution and its parameters (saved in params
).
set.seed(123)
dat <- rexp(1e3, 2)
fit_distr(dat, "exp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.