Description Usage Arguments Details Value Examples
The change_door
function is where the player makes the decision to
stay with their initial choice, a.pick
, or change to the other
unopened door. They do not know what is behind either of the remaining
closed doors.
1 | change_door(stay = T, opened.door, a.pick)
|
This |
function contains two basic arguments. The first is that if the
player decides to stay, then their initial choice |
if the player decides to stay, then the host will move forward with
opening the door associated with a.pick
. If the player decides to
switch doors, the host will open the third door. The third door is
not a.pick
or opened.door
. The final choice of the player is
then assigned to variable final.pick
.
This function returns a length one character vector that is a number
between 1 and 3. That number is assigned to variable final.pick
.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.