Re: [R] executable script
In Python, it is literally this easy: import rpy2.robjects as robjects robjects.r( source(C:/YOUR R FILE GOES HERE ) ) Type the name of your R source code into this script and save it as a Python script (add the suffix .py), and then you can run by double-clicking. If you want to see the results of your program, you'll have to have R print them in a file. Now, to get Python to run on your computer, you'll have to install the following: http://www.python.org/download/releases/2.6.5/ Python 2.6.5 http://sourceforge.net/projects/numpy/files/ NumPy 1.4.1 http://sourceforge.net/projects/rpy/files/rpy2/ Rpy2 2.0.8 (Note that these are the versions I currently have on my computer, there may be more recent ones out there.) You will also have to add Python to your computer's Path. To do this in Windows: 1. Right-click on My Computer, select Properties 2. On the Advanced tab, click Environmental Variables 3. In the System Variables list, select Path and click Edit 4. In the Variable Value line, enter C:\Python26\; at the beginning of the line (or C:\Python30\ if you choose to install Python 3.0) Now you can run Python scripts simply by double clicking them. This makes it very easy to turn R codes into an executable script; the only caveat is that you need to have Python installed on any computers that you want to run your script on. -- View this message in context: http://r.789695.n4.nabble.com/executable-script-tp839859p2254813.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] executable script
True, but all he said was that he wanted to auto-launch his program by double-clicking it. I don't know of any ways to speed up R other than to write the slower functions in C and then call them in your R programs. But I'm not sure that's what he had in mind. On Mon, Jun 14, 2010 at 9:19 PM, skan [via R] ml-node+2255307-302721238-241...@n4.nabble.com wrote: Maybe he wants to compile it to an exe file in order to make it faster. View message @ http://r.789695.n4.nabble.com/executable-script-tp839859p2255307.html To unsubscribe from Re: executable script, click here. -- View this message in context: http://r.789695.n4.nabble.com/executable-script-tp839859p2255329.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] executable script
Maybe he wants to compile it to an exe file in order to make it faster. -- View this message in context: http://r.789695.n4.nabble.com/executable-script-tp839859p2255307.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] executable script
Can you please give me some additional informations. I never created a .bat I have no experience. Peter Alspach wrote: Kia ora unknown requestor One option is to create a .bat file along the following lines: path_to_R\bin\R CMD BATCH yourScript.R Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of mysimbaa Sent: Thursday, 15 November 2007 6:10 a.m. To: r-help@r-project.org Subject: [R] executable script Dear All, Apologies for this simple question and thanks in advance for any help given. I want to make from my .R script an .exe file. Is there any way to transfort my script to an autolaunch file? It means it runs the script by double clicking on it. p.s.: I'm using windows -- View this message in context: http://www.nabble.com/executable-script-tf4806651.html#a13751752 Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/executable-script-tp13751752p16173775.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] executable script
Dear All, Apologies for this simple question and thanks in advance for any help given. I want to make from my .R script an .exe file. Is there any way to transfort my script to an autolaunch file? It means it runs the script by double clicking on it. p.s.: I'm using windows -- View this message in context: http://www.nabble.com/executable-script-tf4806651.html#a13751752 Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] executable script
Kia ora unknown requestor One option is to create a .bat file along the following lines: path_to_R\bin\R CMD BATCH yourScript.R Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of mysimbaa Sent: Thursday, 15 November 2007 6:10 a.m. To: r-help@r-project.org Subject: [R] executable script Dear All, Apologies for this simple question and thanks in advance for any help given. I want to make from my .R script an .exe file. Is there any way to transfort my script to an autolaunch file? It means it runs the script by double clicking on it. p.s.: I'm using windows -- View this message in context: http://www.nabble.com/executable-script-tf4806651.html#a13751752 Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.