rolldie: Rolling a Die

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Sets up a sample space for the experiment of rolling a die repeatedly.

Usage

1
rolldie(times, nsides = 6, makespace = FALSE)

Arguments

times

number of rolls.

nsides

number of sides on the die.

makespace

logical.

Details

The function uses expand.grid() to generate all possible rolls resulting from the experiment of rolling a die. Sides on the die are 1:nsides. Columns of the data frame are called X1, X2, up to Xtimes

Value

A data frame, with an equally likely probs column if makespace is TRUE.

Author(s)

G. Jay Kerns gkerns@ysu.edu.

See Also

tosscoin

Examples

1
2
3
rolldie(2)
rolldie(3, nsides = 4)
rolldie(3, nsides = 4, makespace = TRUE)

aflaherty13/prob documentation built on May 28, 2019, 4:42 p.m.