roll: Roll object

Description Usage Arguments Value Examples

View source: R/roll.R

Description

main roll function

Usage

1
2
3
4
5
6
roll(die, times = 1)

## S3 method for class 'roll'
summary(x, ...)

is.roll(obj)

Arguments

die

object of class "die"

times

number of times to roll the die

x

an object "roll"

...

further arguments ignored

obj

an R object

Value

an object of class "roll"

Examples

1
2
3
4
5
6
7
# fair die
die1 <- die()

# roll a coin 5 times
roll5 <- roll(die1, times = 5)
roll100 <- roll(die(), times = 100)
summary(roll100)

gastonstat/dieroller documentation built on April 12, 2020, 12:22 a.m.