simulate_roll: Dice simulator

Description Usage Arguments Value Examples

View source: R/simulate_roll.R

Description

Simulates results of n trials between two dice. It takes the number of trials, and the two dice to simulate trials for.

Usage

1
simulate_roll(dice_a, dice_b, n)

Arguments

dice_a

The first dice, which we calculate the probability of winning against dice_b.

dice_b

The second dice, which we use to calculate the probability that dice_a beats.

n

An integer representing the number of simulated trials.

Value

A decimal representing percentage of the n rolls dice_a won.

Examples

1
simulate_roll(c(1,2,3), c(1,2,3), 5)

andreyrisukhin/ntdice documentation built on Dec. 19, 2021, 3:34 a.m.