[R] driving R from Python (calldll?)

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jan 24 08:35:03 CET 2002


On Wed, 23 Jan 2002 Farrar.David at epamail.epa.gov wrote:

> Sam Rushing's Python extension 'calldll' will supposedly give me access
> to any DLL,
> and presumably R.DLL in particular, from Python.  I have no experience
> manipulating DLLs as
> yet.  I am learning Python.  I can't find any simple step-by-step
> instructions on how
> to get done what I want to do.  Does anyone have experience with this?
> Is there a
> better way?  Of course, one can use Rterm with DOS piping commands.

Presumably this is for Windows.  You can't use R.dll in isolation.
What you can do is the use the DCOM interface written by Thomas Baier that
you will find on CRAN, which provides a completely standard Windows
interface that I am sure Python can talk to.  My suspicion is that
this would be much easier than porting RSPython to Windows, because no
work would be involved on the R side.  Conversely, it will give you less,
but you don't say anything about `to get done what I want to do'.

BTW

`Of course, one can use Rterm with DOS piping commands'

isn't really true.  Rterm is a Windows program, not a DOS program.  You
can certainly do it on Windows NT/2000/XP, but pipes are limited on
95/98/ME, and DOS can't pipe to Windows programs.  Guido and I failed to
get this sort of thing to work from R for pipe connections under 95/98/ME,
and found lots of things which did not work as documented nor as on NT in
the process.  Also, Perl's system() has problems with redirection and
pipes on 95/98/ME.  So beware!

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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