Learn R Programming

mlbstats (version 0.1.0)

Major League Baseball Player Statistics Calculator

Description

Computational functions for player metrics in major league baseball including batting, pitching, fielding, base-running, and overall player statistics. This package is actively maintained with new metrics being added as they are developed.

Copy Link

Version

Install

install.packages('mlbstats')

Monthly Downloads

126

Version

0.1.0

License

MIT + file LICENSE

Maintainer

Last Published

March 16th, 2018

Functions in mlbstats (0.1.0)

BsR

Calculates the base runs estimator
gpa

Calculates gross production average
rc3

Calculates runs created accounting for all offensive indicators
ab_hr

Calculates at bats per home run
rfa

Calculates range factor
era

Calculates earned run average
dice

Calculates defense-independent component earned run average
bb_k

Calculates walk to strikeout ratio (batting)
risp

Calculates batting average with runners in scoring position
rp

Calculates runs produced
erc

Calculates component earned run average
wr

Calculates whiff rate
aera

Calculates adjusted earned run average (ERA+)
wra

Calculates win ratio
h9

Calculates hits per nine innings pitched (H/9IP)
iso

Calculates isolated power
pfr

Calculates power finesse ratio
ra

Calculates run average
vorp

Calculates value over replacement player (pitching)
rc

Calculates runs created
whip

Calculates walks plus hits per innings pitched (WHIP)
rc2

Calculates runs created accounting for stolen bases
sba

Calculates stolen base attempts
xbh

Calculates extra base hits
sbsr

Calculates stolen base success rate
babip

Calculates batting average on balls in play
bb9

Calculates bases on balls per nine innings pitched (W/9)
k9

Calculates strikeouts per nine innings pitched (K/9)
k_bb

Calculates strikeout to walk ratio (pitching)
pa_so

Calculates plate appearances per strikeout (PA/SO)
ba

Calculates batting average
pafa

Calculates park factor
slg

Calculates slugging percentage
baa

Calculates batting average against
ta

Calculates total average
fip

Calculates fielding independent pitching
fp

Calculates fielding percentage
ops

Calculates on-base plus slugging
obp

Calculates on-base percentage
tc

Calculates total chances
tob

Calculates times on base
EqA

Calculates equivalent average
go_ao

Calculates ground outs-fly outs ratio (GO/AO)