[R] R and Python

Tim Churches tchur at optushome.com.au
Fri Jun 29 08:55:55 CEST 2001

crog master wrote:
> Does the RSPython module work?

Dear crog,

Yes, it does, but with qualifications. Firstly, the current version
is 0.3 which indicates early alpha status, so you should have no
that all aspects of it should work or work reliably. We have been able
to get
it working in both directions (Python -> R and R -> Python), passing
data structures and commands. IMHO, its ability to do that is
indistingguishable from magic.

However, I have found it segfaults whem producing raster graphics (PNGs)
not Postscript graphics, and a colleague found that it segfaults when
large data structures (Python tuple to R vector) of 1 million elements
more. A rather tough test.  In other respects, under Linux, it has been
although the shared R library is a bit slow to import (load) into Python
(about 1.5 seconds on a 866MHz PIII). Also we had to patch the R
makefile to build a shared library in R-1.2.3 but I think this is now
fixed in R-1.3.0.
>                                 If so is the RSPython
> interface supposed to work with Windows?  I only found
> a tar file, so I had to make some modifications to
> even install it, and I am not sure if that is the
> reason it is not working.

If Duncan Temple Lang (DTL) does not explicitly state that it is
intended to work under Windows, then you should assume that it is meant
for Unix/Linux only at these early stages. I would be surprised if a
Windows version did not surface once it reaches production status, but
if DTL's development platform is Unix (and he does work for AT&T after
all), then I would expect alpha and beta versions to target Unix/Linux

> It is not working either from R to Python or vis
> versa.  Meaning I cannot call the one from the other.
> Can anyone point me to some help other than that on
> the
> http://www.omegahat.org/RSPython/ or give me advise?

Have you tried emailing Duncan Temple Lang?

> None of my errors relate to the ones described.  In R
> the module loads but then gives me a no R code error
> and none of the commands work.  In python, I can
> import RS if R is also running, but then even. RS.call
> or an command gives me a no object error.  If R is not
> running at the same time then the module does not
> load.  Yes, the RSPython is in the path.

I suspect that all of these relate to your use of RSPython under
because we have not encountered these problems under Linux.


Tim C
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list