## The function is currently defined as
function (year, SB, CS, single, bb, hbp, ibb)
{
runSB <- linearWeights$runSB[which(linearWeights$Season ==
year)]
runCS <- linearWeights$runCS[which(linearWeights$Season ==
year)]
lgwSB <- (SB * runSB + CS * runCS)/(single + bb + hbp - ibb)
}
Run the code above in your browser using DataLab