Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem.R
'play_game' generates a full game with both outcomes from either staying with the intial door, or switching doors.
1 |
... |
no arguments are used by the function. |
This function first creates a new game along with the contestant's first door pick. It then opens a goat door. Next it creates a final pick for poss possiblities of staying vs not staying. Afterwards, it determines which of the two final picks was the winner and loser. Finally, it creates the results in a data frame and retuns the results.
The function returns a data frame showing the results of a single game with the winning and losing outcomes from staying or not staying.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.