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

Alan Gauld alan.gauld at btinternet.com
Thu Nov 13 00:07:28 CET 2008


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

I'm sorry I can't help for reasons that will become apparent.

But I'd like to thank you for pointing me at R!
I've just bought a commercial statistics package(Minitab) which 
cost me over $150, and it looks as if R could have done all I 
needed for free - or maybe the cost of a book...

> some of the the documentation regarding the RPy module, 

I haven't read anything about RPy so can't help there (yet) 
but it did lead me to the R web site.

> GUI constructed with "easygui" --> this will retrieve pathfiles 
> and user's preferences (floating numbers and strings) 
> --> The preceeding attributes will feed the R scripts-->R scripts 
> will generate pdf files with plots.

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.

Once I've investigated R and RPy a bit more I might be able 
to help, but that will be a whjile... I hope someone else can 
shed some light meantime.

Thanks again,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld



More information about the Tutor mailing list