Learn R Programming

algebraic.dist (version 0.9.1)

sampler.chi_squared: Method for sampling from a chi_squared object.

Description

Method for sampling from a chi_squared object.

Usage

# S3 method for chi_squared
sampler(x, ...)

Value

A function that generates n samples from the chi-squared distribution

Arguments

x

The chi_squared object to sample from

...

Additional arguments (not used)

Examples

Run this code
x <- chi_squared(5)
s <- sampler(x)
set.seed(42)
s(5)

Run the code above in your browser using DataLab