[R] call R scripts from python

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Tue Sep 28 13:08:47 CEST 2004


Fulvio Copex wrote:

> I know this can be a bit OT, but is there a function in python accomplishing the same task?

os.popen - opens a pipe to a command:

[unixy example]

#!/usr/bin/python
import os
catter=os.popen("cat","w")
catter.write( "hello" )


  http://docs.python.org/ is very useful.

  There are other R-Python integration methods, try this:

http://www.omegahat.org/RSPython/index.html

Barry




More information about the R-help mailing list