Description Usage Arguments Details Value Examples
View source: R/Monty Hall Script.R
This function first determines which goat door should be opened. The door is neither the car door or the player's door.
1 | open_goat_door(a.game, a.pick)
|
a.game |
A character vector of length three |
a.pick |
A numeric vector of length one |
This function first determines whether the player chose the car door. If this is true, then a random goat door is selected. if the player did not chose the car door, then the door that is not the player's initial choice and the door that does not contain the car are excluded from the remaining doors. The remaining door is then opened.
This function returns a numeric vector that is the position of the remaining door
1 2 3 | open_goat_door(a.game = c("goat", "car", "goat"), a.pick = 1)
open_goat_door(a.game = c("goat", "car", "goat"), a.pick = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.