# Basics:
dice()
table(dice(10^4))
# 5-sided dice:
dice(events = 1:5)
table(dice(100, events = 5))
# Strange dice:
dice(5, events = 8:9)
table(dice(100, LETTERS[1:3]))
# Note:
dice(10, 1)
table(dice(100, 2))
# Note an oddity:
dice(10, events = 8:9) # works as expected, but
dice(10, events = 9:9) # odd: see sample() for an explanation.
# Limits:
dice(NA)
dice(0)
dice(1/2)
dice(2:3)
dice(5, events = NA)
dice(5, events = 1/2)
dice(NULL, NULL)
Run the code above in your browser using DataLab