R: Datasets for Probabilistic Simulation

Datasets for Simulation {DescTools} | R Documentation

## Datasets for Probabilistic Simulation

### Description

For performing elementary probability calculations in introductory statistic courses, we might want to simulate random games. The dataset `roulette` contains the standard sample space for one spin on a roulette wheel. `cards` contains the standard set of 52 playing cards in four colours (without Jokers). `tarot` does the same with a classic tarot deck.

### Usage

    cards
    tarot
    roulette

### Value

`cards` is a `data.frame` with two columns named `rank` and `suit`

`tarot` is a `data.frame` with three columns named `rank`, `suit` and `desc`

`roulette` is a `data.frame` with two columns named `num` and `col`

### Examples

    head(cards)
    head(tarot)
    head(roulette)

    # drawing 5 cards
    sample(do.call(paste, cards), 5)

    # spin the wheel
    sample(do.call(paste, roulette), 1)

    # simulate the evening in Las Vegas
    sample(do.call(paste, roulette), 32, replace=TRUE)

[Package DescTools version 0.99.28 Index]