Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dist_rand-methods

Random number generation for the distribution objects


Description

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 signature 'conlnorm'
dist_rand(m, n = "numeric")

## S4 method for signature 'conexp'
dist_rand(m, n = "numeric")

## S4 method for signature 'conpl'
dist_rand(m, n = "numeric")

## S4 method for signature 'conweibull'
dist_rand(m, n = "numeric")

## S4 method for signature 'disexp'
dist_rand(m, n = "numeric")

## S4 method for signature 'dislnorm'
dist_rand(m, n = "numeric")

## S4 method for signature 'displ'
dist_rand(m, n = "numeric")

## S4 method for signature 'dispois'
dist_rand(m, n = "numeric")

Arguments

m

a distribution object.

n

number of observations to be generated.

Value

n random numbers

Note

This method does *not* alter the internal state of the distribution object.

See Also

Examples

##########################################
#Create distribution object              #
##########################################
m = displ$new()
m$setXmin(7);m$setPars(2)

##########################################
#Generate five random numbers            #
##########################################
dist_rand(m, 5)

poweRlaw

Analysis of Heavy Tailed Distributions

v0.70.6
GPL-2 | GPL-3
Authors
Colin Gillespie [aut, cre] (<https://orcid.org/0000-0003-1787-0275>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.