fip_values {baseballDBR}R Documentation

Return FIP constants per season

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

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


data("Pitching2016")
head(Pitching2016)

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



[Package baseballDBR version 0.1.2 Index]