| dist_uniform | R Documentation |
See stats::Uniform
dist_uniform(min = NULL, max = NULL)
min |
Lower limit, or |
max |
Upper limit, or |
Both parameters can be overridden with
with_params = list(min = ..., max = ...).
A UniformDistribution object.
Other Distributions:
Distribution,
dist_bdegp(),
dist_beta(),
dist_binomial(),
dist_blended(),
dist_dirac(),
dist_discrete(),
dist_empirical(),
dist_erlangmix(),
dist_exponential(),
dist_gamma(),
dist_genpareto(),
dist_lognormal(),
dist_mixture(),
dist_negbinomial(),
dist_normal(),
dist_pareto(),
dist_poisson(),
dist_translate(),
dist_trunc(),
dist_weibull()
d_unif <- dist_uniform(min = 0, max = 1)
x <- d_unif$sample(100)
d_emp <- dist_empirical(x)
plot_distributions(
empirical = d_emp,
theoretical = d_unif,
estimated = d_unif,
with_params = list(
estimated = inflate_params(
fitdistrplus::fitdist(x, distr = "unif")$estimate
)
),
.x = seq(0, 1, length.out = 100)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.