Vector of length sides, how the dice should be
loaded.
x
Data frame, return value from dice.
...
Additional arguments passed to lattice plotting function.
Details
Simulates the rolling of dice. By default it will roll 2 dice 1 time
and the dice will be fair. Internally the sample function is
used and the load option is passed to sample. load is not
required to sum to 1, but the elements will be divided by the sum of
all the values.
Value
A data frame with rolls rows and ndice columns
representing the results from rolling the dice.
If only 1 die is rolled, then the return value will be a vector.
If plot.it is TRUE, then the return value will be invisible.
Note
If the plot function is used or if plot.it is TRUE, then a
plot will be created on the current graphics device.