change_door_orig: Gives the player the opion to switch to a different door or...

Description Usage Arguments Value Examples

View source: R/change_door.R

Description

Gives the player the opion to switch to a different door or to stay with the original door.

Usage

1
change_door_orig(stay = T, opened.door, a.pick)

Arguments

stay

= T True means that the player would stay with the original door, False would mean to switch to a different door

opened.door

The door that has been opened with a goat behind it.

a.pick

The original door selected by the player

door.choices

The total number of doors in the game.

...

further arguments passed to or from other methods.

Value

This function allows the player to choose if they would like to stay on their original door or switch their choice to a different door given the results of the opened door.

Examples

1
2
3
4
5
## Player switches the door to the only remaining door.
change_door_orig(F, 2, 1)

## Randomly chooses a remaining door from those that remain.
change_door(F, opened.ddor = 3, a.pick = 2, door.choices = 8)

ndavis4904/MontyHall.1 documentation built on Jan. 31, 2021, 12:46 a.m.