Method for sampling from a gamma_dist object.
# S3 method for class 'gamma_dist'
sampler(x, ...)A function that generates n samples from the gamma distribution
x <- gamma_dist(shape = 2, rate = 1)
s <- sampler(x)
set.seed(42)
s(5)
#> [1] 3.6489561 0.8881098 1.5592198 0.4521825 1.3728401