View source: R/Personal_Functions.R
| Monty_Hall | R Documentation | 
A simulator for the famous Monty Hall Problem
Monty_Hall(Games = 10, Choice = "Stay")
Games | 
 The number of games to run on the simulation  | 
Choice | 
 Wether you would like the simulation to either 'Stay' with the first chosen door, 'Switch' to the other door, or 'Random' where you randomly decide to either stay or switch.  | 
This is just a toy example of the famous Monty Hall problem. It returns a ggplot bar chart showing the counts for wins or loses in the simulation.
A ggplot graph is produced. There is no return value.
Travis Barton
Monty_Hall(100, 'Stay')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.