Learn R Programming

Sabermetrics (version 2.0)

whip: WHIP

Description

WHIP (Walks + Hits Per Innings Pitched) describes how many base runners a pitcher gives up an inning.

Usage

whip(h, bb, ip)

Arguments

h
Hits
bb
Walks
ip
Innings Pitched

Value

Returns a numerical value equal to (h+bb)/ip

Details

WHIP is not a perfect indicator of pitcher skill. It is highly defense dependent. Hit rates are largely outside of pitcher control and have high fluctuations.

References

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

https://en.wikipedia.org/wiki/Walks_plus_hits_per_inning_pitched

See Also

era,fip,dice,xfip

Examples

Run this code
## Let's look at Clayton Kershaw's WHIP for the 2014 season
## He gave up H = 139 and BB = 31 and pitched 198.33 innings
## We should get an output of 0.857
whip(139,31,198.33)

## The function is currently defined as
function (h, bb, ip) 
{
    whip <- (h + bb)/ip
    return(whip)
  }

Run the code above in your browser using DataLab