play_n_games: Build a loop Function.

Description Usage Arguments Details Value Examples

View source: R/newscriptmontyhall.R

Description

play_n_games() generates the result if the game has been palyed for n tims and here for instance n is 100.

Usage

1
play_n_games(n = 100)

Arguments

...

iterator values

Details

This is a loop function designed to build a simulation that plays the game for 100 times.

Value

the fuction returns the result of the the decisions taken whether to switch or stay.

Examples

1

ZEINAZEINEDDINE/montyhall documentation built on Sept. 20, 2020, 12:44 a.m.