I have this code in the .php file:
$nb1 = 1;
$nb2 = 2;
exec("C:/xampp/phpR/plotR.r $nb1 $nb2", $response);
echo $response;
And I have in the .r file:
args <- commandArgs(TRUE)
x<-args[1]+args[2]
print(x)
The php code prints "array" on browser. It should print "3". It prints "array". Where are the problem? Thanks