powered by
Returns an DISCRETE distribution object that sample from the vector p_supp of options with probability the vector of probabilities p_prob.
p_supp
p_prob
new_DISCRETE(p_supp, p_prob, p_dimnames = "rvar")
An object of class DISTRIBUTION, DISCRETE
DISTRIBUTION
DISCRETE
A numeric vector of options
A numeric vector of probabilities.
A character that represents the name of the dimension
John J. Aponte
myDistr <- new_DISCRETE(p_supp=c(1,2,3,4), p_prob=c(0.40,0.30,0.20,0.10)) myDistr$rfunc(10)
Run the code above in your browser using DataLab