I\'m passing the predictive model as a function in R. The model works fine and predict with the test data and new data, however, when I pass the model as function and use the ne