dist_transformed | R Documentation |
The density()
, mean()
, and variance()
methods are approximate as
they are based on numerical derivatives.
dist_transformed(dist, transform, inverse)
dist |
A univariate distribution vector. |
transform |
A function used to transform the distribution. This transformation should be monotonic over appropriate domain. |
inverse |
The inverse of the |
# Create a log normal distribution
dist <- dist_transformed(dist_normal(0, 0.5), exp, log)
density(dist, 1) # dlnorm(1, 0, 0.5)
cdf(dist, 4) # plnorm(4, 0, 0.5)
quantile(dist, 0.1) # qlnorm(0.1, 0, 0.5)
generate(dist, 10) # rlnorm(10, 0, 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.