gammaSim: Generate n pseudo random numbers from a gamma distribution.

View source: R/gammaSim.R

gammaSimR Documentation

Generate n pseudo random numbers from a gamma distribution.

Description

Generate n pseudo random numbers from a gamma distribution.

Usage

gammaSim(n = 1, shape = 2, scale = 1, seed = as.integer(Sys.time()))

Arguments

n

the number of pseudo random gamma numbers to generate. Defaults to 1.

shape

Shape parameter. Defaults to 2.

scale

scale parameter. Note this is the inverse of the rate parameter used in some implementations of the gamma function Defaults to 1.

seed

Seed for pseudo random number generating algorithm. Defaults to a integer generated from the system time

Value

vector of gamma random variants of length n

Examples

gammaSim(n=1e5, shape = 3 , scale = 1)

donovanquimby/simulationRNG documentation built on March 19, 2022, 12:46 p.m.