sampler.beta_dist: Sampler for a beta distribution.

View source: R/beta_dist.R

sampler.beta_distR Documentation

Sampler for a beta distribution.

Description

Returns a function that draws n independent samples from the beta distribution.

Usage

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

Arguments

x

A beta_dist object.

...

Additional arguments (not used).

Value

A function function(n = 1, ...) returning a numeric vector of length n.

Examples

x <- beta_dist(2, 5)
s <- sampler(x)
set.seed(42)
s(5)

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