Description Usage Arguments Details Value
simulate a set between two players, using the probability each will win a point on their serve
1 2 |
pA |
probability of player A winning point on their first serve |
pB |
probability of player B winning point on their first serve |
playTiebreak |
logical, play tiebreak at 6 games all |
players |
player names, vector of length 2 |
detail |
return detailed data for set, default FALSE |
p2A |
probability of player A winning point on their second serve |
firstServeA |
probability of player A getting their first serve in |
p2B |
probability of player B winning point on their second serve |
firstServeB |
probability of player B getting their first serve in |
minimum input required is the probability that each player will win a point on their serve, however additional parameters include probability of each player winning a point on their second serve, the probability of a players first serve being in, and whether they play a tiebreak
1 (if player A wins), 0 (if player B wins). If the parameter detail is set to TRUE, then the function will returna detailed list about the simulated set, including data about the indvidual games in that set. This list can be converted to a dataframe using simDf. See simSets for simulating many sets between the two players
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.