R/lognormal.R
sampler.lognormal.Rd
Returns a function that draws n independent samples from the log-normal distribution.
n
# S3 method for class 'lognormal' sampler(x, ...)
A lognormal object.
lognormal
Additional arguments (not used).
A function function(n = 1, ...) returning a numeric vector of length n.
function(n = 1, ...)
x <- lognormal(0, 1) s <- sampler(x) set.seed(42) s(5) #> [1] 3.9391243 0.5685317 1.4378205 1.8829931 1.4982059