Head or tail? Let's try it.
This animation has provided a simulation of flipping coins, which might be helpful in understanding the concept of probability.
library(animation)
saveHTML({
ani.options(interval = 0.2, nmax = 50)
par(mar = c(2, 3, 2, 1.5), mgp = c(1.5, 0.5, 0))
flip.coin(faces = c("Head", "Stand", "Tail"), type = "n",
prob = c(0.45, 0.1, 0.45), col = c(1, 2, 4))
}, img.name = "flip_coin", htmlfile = "flip.coin.html", ani.height = 500,
ani.width = 600, title = "Probability in flipping coins",
description = c("This animation has provided a simulation of flipping coins",
"which might be helpful in understanding the concept of probability."))