change_door: Change Doors.

Description Usage Arguments Details Value Examples

View source: R/newscriptmontyhall.R

Description

change_door()generates a number of the door that the contestant choses if he made a decision to switch doors.

Usage

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

Arguments

...

a logical vector whether the contestant chooses to stay or change his initial selection.

Details

The contestant is given the option to change from their initial selection to the other door that is still closed.

Value

The function returns a door number which is between one and three.

Examples

1

ZEINAZEINEDDINE/montyhall documentation built on Sept. 20, 2020, 12:44 a.m.