sampler.mixture: Sampler for a mixture distribution.
Description
Returns a function that draws samples from the mixture by first
selecting a component according to the mixing weights, then
sampling from the selected component.
Usage
# S3 method for mixture
sampler(x, ...)
Value
A function function(n = 1, ...) returning a numeric
vector of length n.