Learn R Programming

openWAR (version 0.2.2.9001)

getReplacementPlayers: getReplacementPlayers

Description

This function determines and returns the group of players who are considered to be replacement-level players.

Usage

getReplacementPlayers(data, nteams = 30, ...)

# S3 method for openWARPlayers getReplacementPlayers(data, nteams = 30, ...)

# S3 method for openWARPlays getReplacementPlayers(data, nteams = 30, ...)

Arguments

data

An object of class openWARPlays

nteams

the number of teams used to calculate the number of non-replacement players. The default is 30 since that is the number of MLB teams. (Note: Using 27.5 seems to result in a total WAR that is close to 1000.)

...

currently ignored

Details

In the openWAR framework, we first define a specific number of players to be considered 'true' major league talent. This function returns the group of players who do not appear in the group of 'true' major league talent. The performances of the players in this group are used to estimate the value of a replacement-level player for use in converting runs above average (RAA) into runs above replacement (RAR) and ultimately wins above replacement (WAR).

Examples

Run this code
# NOT RUN {
players = getWAR(MayProcessed$openWAR)
summary(players)
replacementIds = getReplacementPlayers(players)
# }

Run the code above in your browser using DataLab