[R] R and Python

Doran, Harold HDoran at air.org
Wed Nov 4 16:26:28 CET 2009


I use both python and R, but decided not to mix the two. I'd rather work directly in R for statistics, visual displays, etc. I really like python for pre-processing data, some preliminary data organization, and XML capes.

 

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Gabor Grothendieck
> Sent: Wednesday, November 04, 2009 10:22 AM
> To: Ryan Sheftel
> Cc: r-help at r-project.org
> Subject: Re: [R] R and Python
> 
> As far as I know the latest versions of neither RSpython nor 
> rpy2 support Windows. For accessing SymPy (which is a python 
> computer algebra system) from R rSymPy went with jython.  Its 
> slower than cpython, particularly the startup, but it should 
> work on all platforms.  See
>   http://rsympy.googlecode.com
> The latest version is 0.1-4.
> 
> If ruby is an option see the rinruby project for accessing R 
> from ruby.  There is a paper on it on jstatsoft.org .
> 
> If java is an option see the RServe package for accessing R from java.
>  Also in the other direction the rJava package can be used to 
> access java from R.
> 
> 
> On Mon, Nov 2, 2009 at 11:37 AM, Ryan Sheftel 
> <ryan.sheftel at rmbaries.com> wrote:
> > I am a long time user of R for financial time series analysis (xts, 
> > zoo,
> > etc) and for my next project I am thinking of adding the Python 
> > language to the mix. The reason for adding Python is primarily its 
> > non-statistical capabilities.
> >
> > So my questions are what have people's experiences been with using 
> > interop between R and Python. I see there are two items, rPy and 
> > RSPython. It looks like rPy makes it possible to call R code from 
> > Python, and RSPython goes both ways. My needs would be to 
> use Python 
> > to drive R to get it's extensive time series and stats, and 
> also to get to Python objects from inside R.
> >
> > I searched the list archives and it looks like many people use rPy, 
> > but what about RSPython for calling Python from R? It looks 
> like rPy 
> > only goes from R into Python, and RSPython has not been 
> updated since 2005?
> >
> > Other messages in the archives state that RSPython only 
> works on Unix?
> >
> > Would I be foolish to build anything mission critical on 
> RSPython? Is 
> > there a better way to get at Python from R?
> >
> > Thanks as always.
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide 
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 



More information about the R-help mailing list