I would define a launcher.bat
where I deal will all R-paths
problem:
PATH PATH_TO_R/R-version/bin;%path%
cd PATH_TO_R_SCRIPT
Rscript myscript.R arg1 arg2
Then in the php
side you can use exec
:
<?php
exec('c:\WINDOWS\system32\cmd.exe /c START PATH_TO_LAUNCHER\LAUNCHER.bat');
?>