Description Usage Arguments Details Value Examples
The contestant is given the option of changing doors from his first selection and change to the other door that is still closed.
1 | change_door(stay = T, opened.door, a.pick)
|
The |
stay argument is a logical vector, as it contains "True" and "false" value. |
The change_door()uses the game-playing strategy of sticking to the contestant's first selection or not by using the arguments stay = True or stay = False. If the contestant decided to stay (i.e. stay = T), the returned result or the final pick will be the contestant's initial selection (a.pick). If the contestant decided not to stay(i.e. stay = F or ! stay), the returned result or the final pick will be the other closed door (i.e the door that was not initially selected by the contestant or the goat door opened by the host)
The function returns a length of one numeric vector indicating the final pick made by the contestant after being offered by the host the option to change doors.
1 2 | change_door( stay=T, opened.door=1, a.pick=3 )
change_door( stay=F, opened.door=1, a.pick=3 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.