babip: Batting Average on Balls in Play (BABIP)

Description Usage Arguments Value Author(s) References See Also Examples

Description

BABIP is a statistic which measures how often a non-home run batted ball falls for a hit.

Usage

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

Arguments

h

Hits

hr

Home Runs

ab

At Bats

k

Strikeouts

sf

Sacrifice Flies

Value

Returns a numerical value equal to (h-hr)/(ab-hr-k-sf)

Author(s)

Fernando Crema, Peter Xenopoulos

References

http://www.fangraphs.com/library/pitching/babip/

See Also

obp,ops

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Let's Calculate Mike Trout's BABIP for the 2014 season
## He had 173 Hits, 36 HR's, 602 AB's, 184 K's, and 10 SF's
## We should get .368 as our output
babip(173,36,602,184,10)

## The function is currently defined as
function (h, hr, ab, k, sf) 
{
    babip <- (h-hr)/(ab-hr-k-sf)
    return(babip)
  }

peterxeno/sabermetrics-package documentation built on May 25, 2019, 2:10 a.m.