/ Published in: Python
使用rpy2访问R的对象
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
>>> from rpy2 import robjects >>> r = robjects.r >>> print r['pi'] [1] 3.141593 >>> print r('pi') [1] 3.141593 >>> print r.pi [1] 3.141593