Closed EdwardJRoss closed 10 months ago
modelr is now superseded, which means that we'll only perform critical bug fixes needed to keep it on CRAN. Thanks for contributing this idea and my apologies that it took so long to inform you that this package is no longer under development.
I expect when calling
add_predictions
on a dataframe with an rstanarm model, that it will add a single new column, with default name pred, to the input dataframe containing the predictions of applying the model. Instead it raises an error.Running:
Result:
The reason is predict.stanreg ignores all positional arguments after the first, and requires the
newdata
argument to be named. However add_predictions passes the data by position.A workaround would be to change the
predict2
function inpredictions.R
to explicitly pass the data as argumentnewdata
. But I'm not sure if this causes issues with other models.