
Last chance! 50% off unlimited learning
Sale ends in
Package: |
dice |
Type: |
Package |
Version: |
1.2 |
Date: |
2014-10-13 |
License: |
GPL (>= 2) |
dice
package can be used to answer questions in any dice-rolling context (e.g., calculating probabilities for the game of craps, solving problems for an introductory probability course, etc.)The dice
package requires the gtools
package.
For a complete list of functions, use library(help="dice")
.
getEventProb(nrolls = 6,
ndicePerRoll = 1,
nsidesPerDie = 4,
eventList = list(4, 3, c(1,2)),
orderMatters = FALSE)
getEventProb(nrolls = 3,
ndicePerRoll = 2,
nsidesPerDie = 6,
eventList = list(10, 4, c(2:6, 8:12)),
orderMatters = TRUE)
getSumProbs(ndicePerRoll = 5,
nsidesPerDie = 6,
nkept = 3,
dropLowest = TRUE)
Run the code above in your browser using DataLab