Learn R Programming

baseballr (version 1.6.0)

fip_plus: Calculate FIP and related metrics for any set of data

Description

This function allows you to calculate FIP and related metrics for any given set of data, provided the right variables are in the data set. The function currently returns both FIP per inning pitched, wOBA against (based on batters faced), and wOBA against per instance of fair contact.

Usage

fip_plus(df)

Value

Returns a tibble with the following columns:

col_nametypes
bbref_idcharacter
seasoninteger
Namecharacter
Agenumeric
Levelcharacter
Teamcharacter
Gnumeric
GSnumeric
Wnumeric
Lnumeric
SVnumeric
IPnumeric
Hnumeric
Rnumeric
ERnumeric
uBBnumeric
BBnumeric
SOnumeric
HRnumeric
HBPnumeric
ERAnumeric
ABnumeric
X1Bnumeric
X2Bnumeric
X3Bnumeric
IBBnumeric
GDPnumeric
SFnumeric
SBnumeric
CSnumeric
POnumeric
BFnumeric
Pitnumeric
Strnumeric
StLnumeric
StSnumeric
GB.FBnumeric
LDnumeric
PUnumeric
WHIPnumeric
BAbipnumeric
SO9numeric
SO.Wnumeric
SO_percnumeric
uBB_percnumeric
SO_uBBnumeric
FIPnumeric
wOBA_againstnumeric
wOBA_CON_againstnumeric

Arguments

df

A data frame of statistics that includes, at a minimum, the following columns: IP (innings pitched), BF (batters faced), uBB (unintentional walks), HBP (Hit By Pitch), x1B (singles), x2B (doubles), x3B (triples), HR (home runs), AB (at-bats), SH (sacrifice hits), SO (strike outs), and season.

Examples

Run this code
# \donttest{
  try({
    df <- bref_daily_pitcher("2015-04-05", "2015-04-30")
    fip_plus(df)
  })
# }

Run the code above in your browser using DataLab