determine_winner: Determine if the contestant is a winner.

Description Usage Arguments Details Value Examples

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

Description

'determine_winner()' determines the contestant is a winner if their final pick is a "car" door.

Usage

1
determine_winner(final.pick, game)

Arguments

...

no arguments are used by the function.

Details

The function uses inputs 'final.pick' and 'game' to determine if the contestant is a winner.

Value

If the character vector for 'final.pick' is a "car" door, the function returns "WIN". If 'final.pick' is "goat", the function returns "LOSE".

Examples

1
  determine_winner(final.pick, game)

ekmcintyre/montyhall documentation built on Feb. 1, 2021, 12:24 a.m.