Description Usage Arguments Details Value Examples
The function returns a data frame with the average eloRating of players an individual has competed against along with the number of interactions that went into calculating the statistic.
1 2 | schedStrElo(eloTab, players = eloTab$players, time.range = eloTab$datetime,
onlyW = F, onlyL = F)
|
eloTab |
an object of class "eloTable" from which ratings are pulled. |
players |
Players for whom to return a schedule score. |
time.range |
POSIXct of length two which describes the time range to look for scores in. |
onlyW |
logical indicating wether to include only wins. Takes precednt over onlyL. |
onlyL |
logical indicating wether to include only loses. |
Using an eloTable the function will calculate the schedule strength of the players requested, with all players in an eloTable being the default. The schedule strength is calculated by taking the average value of all the other players that an individual competed against. Using the onlyW and onlyL parameters the user can specify wether they would like to include only wins or only losses repectively.
A data frame sorted by greatest schedule strength.
1 2 3 4 5 6 7 8 9 10 11 | # generate generic data
interactions <- data.frame (a = sample (letters [1:10], 100, T),
b = sample (letters [1:10], 100, T),
o = sample (c(-1,-1,0,1,1), 100, T),
d = Sys.time () + runif (100, 40, 160))
# convert to interData object
id1 <- intTableConv (interactions)
# produce eloTable object
et1 <- eloTable (id1)
# get schedule strength
schedStrElo (et1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.