Learn R Programming

baseballDBR (version 0.1.2)

RCtech: Batting: Calculate Runs Created using the technical formula.

Description

The "Technical Version" is the most well-known formula for RC. It adds several factors to the basic formula such as sacrifice hits, stolen bases and intentional base on balls. Required fields from the batting table are "AB", "H", "BB", "X2B", "X3B", "HR", "GIDP", "HBP", "SB", "CS", "SF" and "SH," and "IBB."

Usage

RCtech(dat = NULL)

Arguments

dat

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.

See Also

Other Batting functions: BABIP, BA, BBpct, CTpct, HRpct, ISO, Kpct, OBP, OPS, PA, RC2002, RCbasic, SLG, TBs, XBHpct, XBperH, wOBA, wRAA, wRC

Examples

Run this code

data("Batting2016")
head(Batting2016)

Batting2016$RCtech <- RCtech(Batting2016)

Run the code above in your browser using DataLab