Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem.R
'open_goat_door()' selects one of the doors the contestant did not pick.
1 | open_goat_door(game, a.pick)
|
... |
no arguments are used by the function. |
If the contestant selected a "car" door, the function randomly selects one of the two remaining doors. Both of these are "goat" doors. If the contestant selected a "goat" door, the function selects the single remaining "goat" door. The "car" door cannot be selected.
The function returns a numeric vector (1, 2, or, 3) that is different from the one returned by 'select_door()' (a.pick). The return is saved as 'opened.door'.
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.