sampler.gamma_dist: Method for sampling from a 'gamma_dist' object.

View source: R/gamma_dist.R

sampler.gamma_distR Documentation

Method for sampling from a gamma_dist object.

Description

Method for sampling from a gamma_dist object.

Usage

## S3 method for class 'gamma_dist'
sampler(x, ...)

Arguments

x

The gamma_dist object to sample from

...

Additional arguments (not used)

Value

A function that generates n samples from the gamma distribution

Examples

x <- gamma_dist(shape = 2, rate = 1)
s <- sampler(x)
set.seed(42)
s(5)

algebraic.dist documentation built on Feb. 27, 2026, 5:06 p.m.