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 |

The `density()`

, `mean()`

, and `variance()`

methods are approximate as
they are based on numerical derivatives.

# Create a log normal distribution dist <- dist_transformed(dist_normal(0, 0.5), exp, log) density(dist, 1) # dlnorm(1, 0, 0.5)#> [1] 0.7978846#> [1] 0.9972194#> [1] 0.5268835#> [[1]] #> [1] 1.3928036 1.3077456 0.9644412 1.3642390 2.3566417 0.7444349 0.7024642 #> [8] 0.7828532 0.6723029 1.2295892 #>