## The function is currently defined as
function (flyballs, lgHRFB, BB, HBP, K, ip, year)
{
constant <- linearWeights$cFIP[which(linearWeights$Season ==
year)]
xfip <- (13 * (flyballs * lgHRFB) + (3 * (BB + HBP)) - (2 *
K))/(ip) + constant
return(xfip)
}
Run the code above in your browser using DataLab