Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem.R
'change_door()' uses the argument "stay" for the contestant deciding to stay at the door they first picked or switch to the remaining door.
1 | change_door(stay = T, opened.door, a.pick)
|
stay |
Logical argument to equal "T" or "F" to decide if the contestant stays at the a.pick door or switches. |
If the contestant decides to stay (stay=T), the numeric vector 'a.pick' does not change. If the contestant decides to switch (stay=F), the numeric vector that is not 'a.pick' or 'opened.door' is returned.
The function returns a numeric vector (1-3) that cannot match 'opened.door'.
1 2 | change_door(stay=T, opened.door, a.pick)
change_door(stay=F, opened.door, a.pick)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.