simGame: simGame

Description Usage Arguments Details Value

Description

simulate probability of a server winning a game given the probability they win a point on their serve

Usage

1
simGame(p, p2 = NULL, firstServe = NULL, detail = FALSE, player = "A")

Arguments

p

probability of server winning point on their first serve

p2

probability of server winning point on their second serve

firstServe

probability of first serve being in

detail

return detailed output, default of FALSE returns 1 or 0, 1 if server wins, 0 otherwise

player

player name, default is "A"

Details

a couple of additional parameters can be supplied: the probability of the server winning a point on their second serve and probability of their first serve going in.

Value

1 (if server wins), 0 (if returner wins). If the parameter detail is set to TRUE, then the function will return a detailed list about the simulated game, see simGames for more about simulating many games for a single server. This detailed list can be converted into a dataframe using simDf


durtal/servevolleyR documentation built on May 15, 2019, 6:02 p.m.