Learn R Programming

mlbstats (version 0.1.0)

rc2: Calculates runs created accounting for stolen bases

Description

Computes the estimated runs a hitter creates or contributes, accounting for base stealing (see also "rc" for the basic iteration and "rc3" for the technical iteration of the rc statistic)

Usage

rc2(h, bb, tb, ab, cs, sb)

Arguments

h

Number of hits

bb

Number of bases on balls

tb

Number of total bases (one for 1B, two for 2B, three for 3B, and four for HR)

ab

Number of at bats

cs

Number of stolen bases caught

sb

Number of stolen bases

Value

rc2

Examples

Run this code
# NOT RUN {
rc2(150, 35, 165, 400, 7, 9)
# }

Run the code above in your browser using DataLab