We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I try to serialize and unserialize a prediction model, I'm getting an error when I try to predict a value:
eruption.lm = lm(eruptions ~ waiting, data=faithful) json<-serializeJSON(eruption.lm) lin.model<-unserializeJSON(json) newdata = data.frame(waiting=80) predict(lin.model, newdata) # Error: # Error in eval(expr, envir, enclos) : could not find function "list"
Prediction model can be successfully unserialized if I put the following line after unserialize;
attr(lin.model$terms, ".Environment") <- .GlobalEnv
It would be nice if this could work by default. Problem and solution is described here: http://stackoverflow.com/questions/37236806/r-serialize-r-models-as-json/37237530#37237530
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I try to serialize and unserialize a prediction model, I'm getting an error when I try to predict a value:
Prediction model can be successfully unserialized if I put the following line after unserialize;
It would be nice if this could work by default. Problem and solution is described here:
http://stackoverflow.com/questions/37236806/r-serialize-r-models-as-json/37237530#37237530
The text was updated successfully, but these errors were encountered: