[Tutor] Documentation on how to run complete R scripts from Pythoninterpreter

Kent Johnson kent37 at tds.net
Thu Nov 13 00:44:38 CET 2008

On Wed, Nov 12, 2008 at 6:07 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
> "Judith Flores" <juryef at yahoo.com> wrote
>>  I am very new to Python and I have long R scripts that I would like to
>> run under the Python Interpreter.

> But I'd like to thank you for pointing me at R!

R is very powerful. I found it a bit opaque at first. You will
probably want a book :-)
You might be interested in these notes, which basically tell how to
use R to do first-semester college statistics:

>> some of the the documentation regarding the RPy module,

I have not had any luck with RPy myself though presumably others have
more success. The r() function might let you execute your scripts:

> It sounds like you could do this by just creating the scripts in vanilla
> Python then running the R scripts under R itself from Python usiing
> os.system or the Subprocess module.

I think that is probably the easiest approach if you can pass the
script parameters on the command line.


More information about the Tutor mailing list