Random number generation for the distribution objects
Source:R/all_generics.R
, R/conlnorm.R
, R/def_conexp.R
, and 6 more
dist_rand-methods.Rd
This is generic function for generating random numbers
from the underlying distribution of the distribution reference objects.
This function generates n
random numbers using the parameters
and xmin values found in the associated reference object.
Usage
dist_rand(m, n)
# S4 method for class 'conlnorm'
dist_rand(m, n = "numeric")
# S4 method for class 'conexp'
dist_rand(m, n = "numeric")
# S4 method for class 'conpl'
dist_rand(m, n = "numeric")
# S4 method for class 'conweibull'
dist_rand(m, n = "numeric")
# S4 method for class 'disexp'
dist_rand(m, n = "numeric")
# S4 method for class 'dislnorm'
dist_rand(m, n = "numeric")
# S4 method for class 'displ'
dist_rand(m, n = "numeric")
# S4 method for class 'dispois'
dist_rand(m, n = "numeric")
Examples
##########################################
#Create distribution object #
##########################################
m = displ$new()
m$setXmin(7);m$setPars(2)
##########################################
#Generate five random numbers #
##########################################
dist_rand(m, 5)
#> [1] 34 35 11 8 11