rsim: Simulate n random numbers from an rv.

Description Usage Arguments Examples

Description

Simulate n random numbers from an rv.

Usage

1
rsim(x, n)

Arguments

x

a random variable

n

number of simulations

Examples

1
2
3
4
coin <- rv(c(-1, 1))
rsim(coin, 100)
mean(rsim(coin, 100))
mean(rsim(coin, 1000))

Curt-Younkin/RStudioConf2017 documentation built on May 6, 2019, 12:54 p.m.