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 gkerns@ysu.edu.

See Also

rolldie

Examples

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

prob documentation built on May 2, 2019, 12:20 p.m.