sampleFrom {BLCOP} | R Documentation |
Sample from a distribution object
Description
Generates samples from a distribution held by an object of class distribution
or
mvdistribution
. Intended mainly for internal use.
Usage
sampleFrom(dstn, n = 1)
Arguments
dstn |
an object of class |
n |
Number of samples to generate |
Value
A vector or matrix of samples.
Author(s)
Francisco Gochez <fgochez@mango-solutions.com>
Examples
x <- distribution("pois", lambda = 5)
hist(sampleFrom(x, 1000), col = "blue", prob = TRUE)
[Package BLCOP version 0.3.3 Index]