schedStrElo: Get the schedule strength of players in an Elo Table

Description Usage Arguments Details Value Examples

Description

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.

Usage

1
2
schedStrElo(eloTab, players = eloTab$players, time.range = eloTab$datetime,
  onlyW = F, onlyL = F)

Arguments

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.

Details

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.

Value

A data frame sorted by greatest schedule strength.

Examples

 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)

nmmarquez/linHierarchy documentation built on May 23, 2019, 9:28 p.m.