Learn R Programming

openWAR (version 0.2.2.9001)

getWAR: getWAR

Description

Tabulates WAR

Usage

getWAR(data, dataRepl = NULL, nteams = 30, verbose = TRUE, ...)

# S3 method for GameDayPlays getWAR(data, dataRepl = NULL, nteams = 30, verbose = TRUE, ...)

# S3 method for list getWAR(data, dataRepl = NULL, nteams = 30, verbose = TRUE, ...)

# S3 method for openWARPlays getWAR(data, dataRepl = NULL, nteams = 30, verbose = TRUE, ...)

Arguments

data

An object of class 'openWARPlays'

dataRepl

An object of class 'openWARPlays' that will be used to calculate the replacement level.

nteams

The nteams argument to be passed to getReplacementPlayers

verbose

do you want information about how many replacement-level players there are?

...

currently ignored

Value

An data.frame of class openWARPlayers

Details

Compute each player's WAR, given their RAA values

Examples

Run this code
# NOT RUN {
MayProcessed = makeWAR(May)
# }
# NOT RUN {
war = getWAR(MayProcessed)
war = getWAR(MayProcessed, nteams = 27.5)
# }
# NOT RUN {
war = getWAR(May)
# }
# NOT RUN {
MayProcessed = makeWAR(May)
# }
# NOT RUN {
war = getWAR(MayProcessed)
# }
# NOT RUN {
MayProcessed = makeWAR(May)
# }
# NOT RUN {
war <- getWAR(MayProcessed$openWAR)
war <- getWAR(MayProcessed$openWAR, dataRepl = head(MayProcessed$openWAR, 10000))
# }

Run the code above in your browser using DataLab