Useful for demonstrating the Law of Large Numbers

flip_coin(flips = 100L, seed = sample.int(.Machine$integer.max, 1))

Arguments

flips

an integer (defaults to 100)

seed

random number seed

Value

ggplot object

Author

Lawrence R. De Geest

Examples

# Flip a coin 1000 times and plot the probabilities of Heads and Tails: flip_coin(flips = 1000)