sampler.default: Sampler for non-dist objects (degenerate distributions).

View source: R/dist.R

sampler.defaultR Documentation

Sampler for non-dist objects (degenerate distributions).

Description

Sampler for non-dist objects (degenerate distributions).

Usage

## Default S3 method:
sampler(x, ...)

Arguments

x

The object to sample from

...

Additional arguments to pass

Value

A function that takes n and returns n copies of x

Examples

s <- sampler(5)
s(3)  # returns c(5, 5, 5)

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