Learn R Programming

cascsim (version 0.4)

doSample: Sampling from the distribution.

Description

Sampling from the distribution.

Usage

doSample(object, n, ...)

# S4 method for Normal,numeric doSample(object, n)

# S4 method for Beta,numeric doSample(object, n)

# S4 method for Exponential,numeric doSample(object, n)

# S4 method for Gamma,numeric doSample(object, n)

# S4 method for Lognormal,numeric doSample(object, n)

# S4 method for Pareto,numeric doSample(object, n)

# S4 method for Poisson,numeric doSample(object, n)

# S4 method for NegativeBinomial,numeric doSample(object, n)

# S4 method for Geometric,numeric doSample(object, n)

# S4 method for Uniform,numeric doSample(object, n)

# S4 method for Weibull,numeric doSample(object, n)

# S4 method for Empirical,numeric doSample(object, n)

Arguments

object

A Distribution Object

n

Number of samples

...

Additional function arguments

Examples

Run this code
# NOT RUN {
xPareto <- new("Pareto",p1=20,p2=3)
doSample(xPareto,10000)
# }

Run the code above in your browser using DataLab