Learn R Programming

ADtools (version 0.5.4)

rgamma0: Simulate gamma random variates

Description

Simulate gamma random variates

Usage

rgamma0(n, shape, scale, method = "inv_tf")

Arguments

n

Positive integer; the number of samples.

shape

Positive number; the shape of the gamma distribution.

scale

Positive number; the scale of the gamma distribution.

method

'base' or 'inv_tf'; 'base' refers to `stats::rgamma` while 'inv_tf' refers to inverse transform.

Examples

Run this code
# NOT RUN {
n <- 10
rgamma0(n, shape = 1, scale = 1)

# }

Run the code above in your browser using DataLab