Hi,

I've just started using rpy/rpy2. I have a SVM model trained using the
kernlab package. I stored the model in a R file called
"MPDR.training_size2000.RData" (so if I call 'load' in R, the object
'model' is the trained model).

I'm trying to load the model through rpy2, then run predict() on it. My
code is as follows:

import rpy2.rpy_classic as rpy
import rpy2.robjects as robj
rpy.set_default_mode(rpy.NO_CONVERSION)
model = rpy.r.load("MPDR.training_size2000.RData")
rpy.r.predict(model, <some data here>)


and I get the error:

no applicable method for 'predict' applied to an object of class "character"


It seems like I'm not loading the model correctly. What can be done?


Thanks,
--Elizabeth
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to