This is a test version of Biostars. For the public version, visit https://www.biostars.org.
What Module To Use To Integrate R In Python : Rpy Or Rpy2

Hi,

I want to be able to execute R code from python. I found that several modules allow to do that, in particular rpy and rpy2. I wonder which one i should chose. Is rpy2 going to replace rpy or are the two versions going to be maintained ? (I couldn't find the information) rpy outputs R vectors as lists and rpy2 returns robjects. Is it really interesting to get R-like objets rather than python basic data structures ?

I'm looking for something that will be mainteined on the long term (and adapted to python3), and also for something whose syntax is stable, because I don't want to be forced to update my code.

Thank you by advance for your answers.

Hélène Badouin, PhD student in Paris South University

r python

1 answer

You should use rpy2, the successor to rpy.

Log in to answer this question.