Learn R Programming

mlbstats (version 0.1.0)

babip: Calculates batting average on balls in play

Description

Generates the frequency a batter reaches a base after putting the ball in play (normal around .300)

Usage

babip(h, hr, ab, k, sf)

Arguments

h

Number of hits

hr

Number of home runs

ab

Number of at bats

k

Number of strikeouts

sf

Number of sacrifice flies

Value

babip

Examples

Run this code
# NOT RUN {
babip(200, 25, 525, 55, 6)
# }

Run the code above in your browser using DataLab