simGames: simGames

Description Usage Arguments Details Value

Description

simulate many service games for a single server, given a number of parameters, that include probability of server winning a point on their first serve, their second serve, and probability of their first serve going in.

Usage

1
2
simGames(n = 1000, p, p2 = NULL, firstServe = NULL, player = "A",
  .progress = "none")

Arguments

n

number of games to simulate (default, 1000)

p

probability of server winning a point on the first serve

p2

probability of server winning a point on their second serve

firstServe

probability of first serve being in

player

player name, default is "A"

.progress

plyr's progress bar

Details

adding a parameter ("text", or "time") to the .progress argument will cause two progress bars to show up, one after another, the first charts the simulation of many games, while the second processes these results into something more useful for users.

Value

The function returns a large list, which can be printed, summarised, or plotted. It can also be converted to a dataframe using simDf, which contains data about the simulated sets, and games, within each simulation.


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