[R] R script From PHP
Romain Francois
romain.francois at dbmail.com
Wed Dec 2 13:04:30 CET 2009
On 12/02/2009 12:30 PM, Hrishi Mittal wrote:
>
>
> I agree with Romain that you should probably try and get Rserve to work as
> that is a much better way. However, to get your commandline version working,
> I suggest you use the Rscript comman instead of a bash script. So let's say
> you save your R script as a myscript.R file. Then do:
>
> shell_exec('Rscript /path/to/myscript.R'." 2>&1");
>
> If that still gives you an error like Rscript command not found, then you
> need to make sure your R bin directory is added to the PATH system variable.
... maybe shell_exec('/usr/bin/Rscript /path/to/myscript.R'." 2>&1");
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/FtUu : new package : highlight
|- http://tr.im/EAD5 : LondonR slides
`- http://tr.im/BcPw : celebrating R commit #50000
More information about the R-help
mailing list