R code for predicting NBA