dice: Create, modify or convert from/to dice objects

Description Usage Arguments See Also Examples

View source: R/dice.R

Description

Create, modify or convert from/to dice objects

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dice(dval)

is.dice(x, ...)

as.dice(x, ...)

## S3 method for class 'dice'
print(x, ...)

## S3 method for class 'dice'
as.table(x, ...)

Arguments

dval

an integer vector

x

an arbitrary R object

...

further arguments passed to methods

See Also

expand, table

Examples

1
2
3
4
5
6
7
8
# Regular d6 dice
dice(6)

# d4 dice with sides 0, 1, 2, 4
dice(c(0:3))

# d4 dice with two 2s and two 5s
dice(c(2, 2, 5, 5))

AkselA/R-ymse documentation built on March 21, 2020, 9:52 a.m.