Here is what I am doing in python using RPy2:
1. Generating a CART tree (using rpart in R)
2. Generate the pmml for the same (using pmml in R)
3. Do some operations on pmml string in Python.

Environment: CentOS
Python version: 2.4.3
Rpy2 version: 2.0.4
R version: 2.8.1

<code>

import rpy2.robjects as ro
ro.r.library("rpart")
ro.r.library("pmml")
data = ""> cartObj = ro.r.rpart("Illiteracy~.", data = "" method = "anova",
                    control = ro.r['rpart.control'](minsplit = 10, cp = 0.000001))
pmmlObj = ro.r.pmml(cartObj)
print pmmlObj
# print the object in R
ro.r['print'](pmmlObj)

</code>

Ideally when I print this object I should get the pmml string corresponding to the CART tree.
It appears that when I am trying to print the object in Python, the pmml string is getting truncated. Though printing the same in R works fine.
Am I doing something wrong?

Thanks,
Manish


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to