Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange Problem with RPy2

After installing RPy2 from

http://rpy.sourceforge.net/rpy2.html

I'm trying to use it in Python 2.6 IDLE but I'm getting this error:

>>> import rpy2.robjects as robjects
>>> robjects.r['pi']

<RVector - Python:0x0121D8F0 / R:0x022A1760>

What I'm doing wrong?

like image 837
jrara Avatar asked Sep 15 '26 08:09

jrara


1 Answers

Have you tried looking at the vector that's returned?

 >>> pi = robjects.r['pi']
 >>> pi[0]
 3.14159265358979
like image 142
Shane Avatar answered Sep 17 '26 20:09

Shane



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!