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