Generates samples from a distribution held by an object of class distribution
or
mvdistribution
. Intended mainly for internal use.
sampleFrom(dstn, n = 1)
an object of class distribution
or mvdistribution
.
Number of samples to generate
A vector or matrix of samples.
# NOT RUN {
x <- distribution("pois", lambda = 5)
hist(sampleFrom(x, 1000), col = "blue", prob = TRUE)
# }
Run the code above in your browser using DataLab