Description Usage Arguments Details Value Examples
View source: R/newscriptmontyhall.R
open_goat_door() generates door with goat behind it to be opened by the host.
1 | open_goat_door(game, a.pick)
|
... |
initial door selected by the contestant |
The host will open a goat door and a door different than the one that was chosen by the contestant.So if the contestant has chose initially a car door then the host can now choose randomly any other door, but if the contestant has initially chose a door where there is a goat behind it, then now the host must choose the other goat door so the host will have in this case one option door to be choosed.
The function returns a one numerical number indicating which door is slected by the host.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.