Learn R Programming

baseballr (version 0.8.6)

woba_plus: Calcuate wOBA and related metrics for any set of data

Description

This function allows you to calculate wOBA for any given set of data, provided the right variables are in the data set. The function currently returns both wOBA per plate appearance on wOBA per instance of fair contact.

Usage

woba_plus(df)

Arguments

df

A data frame of statistics that includes, at a minimum, the following columns: uBB (unintentional walks), HBP (Hit By Pitch), X1B (singles), X2B (doubles), X3B (triples), HR (home runs), AB (at-bats), SH (sacrafice hits), SO (strike outs), and season.

Examples

Run this code
# NOT RUN {
woba_plus(df)
# }

Run the code above in your browser using DataLab