R code for Predict 411