select_door: The contestant selects a door.

Description Usage Arguments Details Value Examples

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

Description

select_door() generates a door selection and the contestant randomly chooses from.

Usage

1

Arguments

...

no arguments are used by the function.

Details

This function creates a vector of doors numbered 1, 2, 3. Three doors that one contestant can choose from. Then the contestant randomly selects ONE of the doors. The function returns the selection that the contestant has made, the door number between 1 and 3.

Value

The function returns a length 1 numeric vector indicating the door position or number that one contestant initially selects.

Examples

1

lghb2005/montyhall documentation built on Jan. 30, 2021, 12:46 a.m.