Hi, I know that using PHP command exec(...) you can call a unix command that would run an R script, but how does it work on Windows platform? Basically, I have an R function which takes a file and two strings as arguments and I need to call this function and pass to it the arguments automatically from PHP (when the user hits a submit button on the webpage), any ideas?? Thanks! -- View this message in context: http://www.nabble.com/PHP-and-R-tp21397426p21397426.html Sent from the R help mailing list archive at Nabble.com.
On Sun, 11 Jan 2009, Applejus wrote:> I know that using PHP command exec(...) you can call a unix command that > would run an R script, but how does it work on Windows platform?Exactly the same way.> Basically, I have an R function which takes a file and two strings as > arguments and I need to call this function and pass to it the arguments > automatically from PHP (when the user hits a submit button on the webpage), > any ideas??See Rscript[.exe], which I gave an example of only this morning. It is documented in 'An Introduction to R', amongst other places. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Hi, I know I've already asked this question, but I am really getting trouble getting a PHP document execute an R function on windows. I would appreciate if someone could give me a simple example code where a php calls an R function and passes to it arguments, specifying also how to set up the paths etc... (should the .r file be in the www directory, and what settings should be done?) Thanks! -- View this message in context: http://www.nabble.com/PHP-and-R-tp21507207p21507207.html Sent from the R help mailing list archive at Nabble.com.