Displaying 1 result from an estimated 1 matches for "triedbut".
2013 Mar 28
2
how to call R in PHP
...veral ways, but none of them succeed.
first of all, I tried Rserve, but I failed to connect to it.
Then, I tried cmd.exe. I get the result when I use" R CMD BATCH --vanilla..." in cmd, but I have no idea how to call cmd in php.
I know "system()" is good to call other systems, I triedbut I get no result in my html page.
if you could provide some suggestion or examples, i would appreciate your help.
the code in my php is:
$cmd="R CMD BATCH--vanilla --slave delete.r";
$res=system($cmd);
the code in the delete.r file is:
setwd("c://wamp//www//analysis");
x<-4;...