Find home run percentage for batters with more than zero at bats. Required fields from the Batting table are "AB" and "HR."
HRpct(dat = NULL)
A data frame you would wish to calculate. The data frame must have the same column names found in
The Lahman
package or the Chadwick Bureau GitHub repository.
Other Batting functions: BABIP
,
BA
, BBpct
,
CTpct
, ISO
,
Kpct
, OBP
, OPS
,
PA
, RC2002
,
RCbasic
, RCtech
,
SLG
, TBs
,
XBHpct
, XBperH
,
wOBA
, wRAA
, wRC
data("Batting2016")
head(Batting2016)
Batting2016$HRpct <- HRpct(Batting2016)
Run the code above in your browser using DataLab