Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem.R
open_goat_door()
This function will open one goat door only
and it should be the door that is goat door and the door that the contestant did not pick.
1 | open_goat_door(game, a.pick)
|
... |
arguments used are ( game, a.pick ) |
The host will always open a door with a goat behind it. But it can't be a door the contestant has already selected. It must be a door that is not a car and not a current contestant selection. If the contestant selects the car on the first guess the host can open either door, but if the contestant selects a goat the host only has one option.
The function returns a numeric vector of length one indicating the opened door by host.
1 | open_goat_door(game, a.pick)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.