fip_values: Return FIP constants per season

Description Usage Arguments Examples

Description

Get fip constants for each season. By default the function uses a method adapted from Tom Tango and used by Fangraphs. The function returns FIP constants based on ERA FIP_ERA as well as constants based on RA FIP_RA. Both the Tango and Frangraphs formulas use ERA for their FIP constants.

Usage

1
fip_values(dat = NULL, Sep.Leagues = FALSE, Fangraphs = FALSE)

Arguments

dat

A full pitching table from the Lahman package or the Chadwick Bureau GitHub repository. Any subsetting or removal of players will affect your results. All players for each year are recommended.

Sep.Leagues

If TRUE, this will split the calculation and return unique FIP constants for the various leagues. This can be helpful in handling Designated Hitters and National League pitchers. It also isolates the park factors to their respective leagues.

Fangraphs

If TRUE the function will return the Fangraphs FIP constants. This can not be used in conjunction with the Sep.Leagues argument because Fangraphs does not separate FIP constants by league.

Examples

1
2
3
4
5
data("Pitching2016")
head(Pitching2016)

fip_df <- fip_values(Pitching2016, Fangraphs=FALSE)
head(fip_df)

keberwein/baseballDBR documentation built on May 20, 2019, 8:29 a.m.