play_n_games: Runs the Monty Hall game a given amount of times and shows...

Description Usage Arguments Details Value Examples

View source: R/monty-hall-problem.R

Description

'play_n_games' plays the Monty Hall game a number of times based on the numerical parameter you pass to it. It then shows the proportional results.

Usage

1

Arguments

'n'

- This determines the number of times the game is run.

Details

The function uses a 'for' loop that continues based on the parameter passed into the function. It records each outcome in a results list. When the loop finishes, it creates a table showing the proportional results.

Value

The function returns a results table showing the proportional results of 'n' runs of the game.

Examples

1
2

Vodkard/montyhall documentation built on Feb. 27, 2020, 12:42 a.m.