select_door: Selects a door.

Description Usage Arguments Details Value Examples

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

Description

'select_door' picks a number from 1 to 3, representing the three doors.

Usage

1

Arguments

...

no arguments are used by the function.

Details

First, the variable 'doors' is created, holding the numbers 1 through 3. Then one of the numbers is selected randomly and put into the variable 'a.pick' which is returned when the function is called.

Value

The function returns a numerical value between 1 and 3.

Examples

1

Vodkard/montyhall documentation built on Feb. 27, 2020, 12:42 a.m.