Description Usage Arguments Details Value Examples
The play_n_games() function allows the user to simulate any number of games in a single function. The user must only specify how many iterations of the Monty Hall Game they want the simulation to run.
1 | play_n_games(n = 100)
|
This |
function relies on multiple arguments to work effectively. Refore,
running this function, the user must ensure they have installed the
package dplyr. The function works by passing the function play_game()
through an iterator where n equals the number of times the game is played.
The variable |
The play_n-game() function uses a loop simulation to run a user defined number of game iterations and returns the quantitative results. For example, if the user wishes to simulate 10,000 iterations of the game, they simply only need to change the number n to equal 10,000.
results.df
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.