## 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