sampler.empirical_dist: Method for obtaining the sampler for a 'empirical_dist'...

View source: R/empirical_dist.R

sampler.empirical_distR Documentation

Method for obtaining the sampler for a empirical_dist object.

Description

Method for obtaining the sampler for a empirical_dist object.

Usage

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

Arguments

x

The object to obtain the sampler of.

...

Additional arguments to pass (not used).

Value

A function that takes n and returns n resampled observations.

Examples

ed <- empirical_dist(c(10, 20, 30))
s <- sampler(ed)
set.seed(42)
s(5)

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