tosscoin: Tossing a Coin

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Sets up a sample space for the experiment of tossing a coin repeatedly with the outcomes "H" or "T".

Usage

1
tosscoin( times, makespace = FALSE )

Arguments

times

number of tosses.

makespace

logical.

Details

The function uses expand.grid() to generate all possible sequences of flips resulting from the experiment of tossing a coin. Columns of the dataframe are denoted toss1, toss2, up to tosstimes,

Value

A data frame, with an equally likely probs column if makespace is TRUE.

Author(s)

G. Jay Kerns [email protected].

See Also

rolldie

Examples

1
2
3
tosscoin(2)
tosscoin(3, makespace = TRUE)
 

prob documentation built on May 30, 2017, 4:15 a.m.