Hi all,
I'm using Rpy2 to train a logistic regressor (using the "glm" function
in R), and I need to save the model for futher use.
I naively try to use pickle, but I have an error message:
import rpy2.robjects as robjects
fit = robjects.r.glm(formula=f, family=robjects.r.binomial(), data=data)
output = open('glm.pickle', 'w')
pickle.dump(fit, output)
>>> pickle.PicklingError: Can't pickle <type 'rinterface.SexpVector'>:
it's not found as rinterface.SexpVector
Is there another way to save a Rpy2 object???
Thanks,
Rejean Ducharme
------------------------------------------------------------------------------
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list