change_door: CHANGE DOORS.

Description Usage Arguments Details Value Examples

View source: R/montyhall.R

Description

change_door () CHANGE DOORS.

Usage

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

Arguments

if

arguments are used by the function.

Details

The contestant is given the option to change from their initial selection to the other door that is still closed. The function will represent the game-playing strategy as the argument stay=TRUE or stay=FALSE.

Value

The function returns the final pick of the door whether to Stay or Switch.

Examples

1
change_door ()

Sanaz-27/montyhall documentation built on Dec. 18, 2021, 12:56 p.m.