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.
# S3 method for class 'mixture'
sampler(x, ...)A function function(n = 1, ...) returning a numeric
vector of length n.