toss | R Documentation |
Creates an object of class "toss"
toss(coin, times = 1)
is.toss(x)
as.toss(x)
coin |
object of class |
times |
number of tosses |
x |
an R object |
an object of class "toss"
with the following elements:
tosses |
vector of tosses |
sides |
vector of coin |
prob |
vector of coin |
total |
total number of tosses |
heads |
number of heads |
tails |
number of tails |
coin1 <- coin()
# toss a coin 10 times
toss10 <- toss(coin1, times = 10)
# add 5 more tosses
toss15 <- toss10 + 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.