View source: R/SDS100_generate_simulated_samples.R
rflip_count | R Documentation |
Gives a count/proportion from simulating n coin flips
rflip_count(num_flips = 1, prob = 0.5, report_proportion = FALSE)
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". |
set.seed(100)
rflip_count(10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.