open_goat_door: Host opens goat door

Description Usage Arguments Details Value Examples

View source: R/monty-hall-problem.R

Description

open_goat_door() This function will open one goat door only and it should be the door that is goat door and the door that the contestant did not pick.

Usage

1
open_goat_door(game, a.pick)

Arguments

...

arguments used are ( game, a.pick )

Details

The host will always open a door with a goat behind it. But it can't be a door the contestant has already selected. It must be a door that is not a car and not a current contestant selection. If the contestant selects the car on the first guess the host can open either door, but if the contestant selects a goat the host only has one option.

Value

The function returns a numeric vector of length one indicating the opened door by host.

Examples

1
open_goat_door(game, a.pick)

malmufre/montyhall documentation built on Sept. 20, 2020, 12:46 a.m.