rflip_count: Gives a count/proportion from simulating n coin flips

View source: R/SDS100_generate_simulated_samples.R

rflip_countR Documentation

Gives a count/proportion from simulating n coin flips

Description

Gives a count/proportion from simulating n coin flips

Usage

rflip_count(num_flips = 1, prob = 0.5, report_proportion = FALSE)

Arguments

num_flips

The number of times to flip the coin.

prob

The probability of generated a "heads" on each flip.

report_proportion

A Boolean that if set to TRUE will return the proportion of coin flips that were "heads" otherwise it returns the number of coin flips that were "heads".

Examples

 set.seed(100)
 rflip_count(10)



emeyers/SDS100 documentation built on April 28, 2024, 5:07 p.m.