I'm curious if there are users of RPy on this list. I've recently created a gui front end using Tkinter for some python scripts I've written for some of our internal operations and I am quite pleased with how this program works. I wonder if it is possible to also get this gui to run R functions through the use of RPy. Going even a step further, I wonder if it is possible to get this program to run R functions withouth even having R installed on the machine. Currently, I can use py2exe to create a executable that allows for this gui to appear and for all python scripts to run even if the user doesn't have python on their machine. So (maybe) in theory if I can link Rpy to my gui to run R, I can then use py2exe to compile it and that would allow the user to run the functions even if R isn't on the machine. I realize this is a broad question and has no minimal commented code. But, if anyone has some experience using Rpy, Tkinter and R I can come up with a small example to see if we could work out a possible way to use Tkinter to run R. [[alternative HTML version deleted]]
Doran, Harold wrote:> I'm curious if there are users of RPy on this list. I've recently > created a gui front end using Tkinter for some python scripts I've > written for some of our internal operations and I am quite pleased with > how this program works. > > I wonder if it is possible to also get this gui to run R functions > through the use of RPy. Going even a step further, I wonder if it is > possible to get this program to run R functions withouth even having R > installed on the machine. > > Currently, I can use py2exe to create a executable that allows for this > gui to appear and for all python scripts to run even if the user doesn't > have python on their machine. So (maybe) in theory if I can link Rpy to > my gui to run R, I can then use py2exe to compile it and that would > allow the user to run the functions even if R isn't on the machine. > > I realize this is a broad question and has no minimal commented code. > But, if anyone has some experience using Rpy, Tkinter and R I can come > up with a small example to see if we could work out a possible way to > use Tkinter to run R.RPy justs translates between Python and R, it's not an implementation of R in Python, so you have to have R installed somewhere for it to work. What is possible is to use a web-services approach, where the GUI sends requests to a web server that has Python, RPy, and R installed on it, gets back the results, and displays them. -- Gad Abraham Dept. CSSE and NICTA The University of Melbourne Parkville 3010, Victoria, Australia email: gabraham at csse.unimelb.edu.au web: http://www.csse.unimelb.edu.au/~gabraham
Doran, Harold wrote:> I'm curious if there are users of RPy on this list. I've recently > created a gui front end using Tkinter for some python scripts I've > written for some of our internal operations and I am quite pleased with > how this program works.> Currently, I can use py2exe to create a executable that allows for this > gui to appear and for all python scripts to run even if the user doesn't > have python on their machine. So (maybe) in theory if I can link Rpy to > my gui to run R, I can then use py2exe to compile it and that would > allow the user to run the functions even if R isn't on the machine.You're confounding having something on a machine with having something installed on a machine. Py2exe works by bundling all of python with the exe file, so in a sense the target machine does have python on it, just not installed in C:\Python in the usual way. If you give someone four different py2exe programs, they end up having four lots of python. For Py2exe to work with R so that people wouldn't have to install R, it would mean that Py2exe would have to bundle up all of R in the exe file. So that's the R binary, the .dll, every library package needed and so on. In a word, 'ick!'.> I realize this is a broad question and has no minimal commented code. > But, if anyone has some experience using Rpy, Tkinter and R I can come > up with a small example to see if we could work out a possible way to > use Tkinter to run RRpy is the way to go, but you will have to get your users to install R, python and Rpy. It's only a few clicks and they only have to do it once. Personally I've used PyQt to create python programs with Qt GUIs that call R and it all works very nicely. Barry