Learn R Programming

mlbstats (version 0.1.0)

dice: Calculates defense-independent component earned run average

Description

Computes earned run average from hits and walks (compare with "era" which is the traditional formula for earned run average, "aera" which is a pitcher's adjusted earned run average, or "erc" which is the component earned run average)

Usage

dice(bb, hbp, hr, k, ip)

Arguments

bb

Number of bases on balls

hbp

Number of hit batters

hr

Number of home runs

k

Number of strikeouts

ip

Number of innings pitched

Value

dice

Examples

Run this code
# NOT RUN {
dice(45, 10, 60, 130, 400)
# }

Run the code above in your browser using DataLab