Displaying 1 result from an estimated 1 matches for "arghuments".
Did you mean:
agruments
2009 Nov 11
0
Passing MULTIPLE arguments from php file to r scripts
...uot;/usr/bin/R --vanilla --slave ";
//print($cmd);
$ret = system($cmd);
?>
*Then I changed the r script ex_1.r:---*
print("hello")
print(argv1)
print(argv2)
When I ran the php file neither the php file could invoke the r script nor
the arguments got printed(none of the arghuments got printed,not even argv1
)
So with this change in $cmd :--
$cmd = "echo 'argv1 <- \"ex_1.R\"; source(argv1)' | " ."echo 'argv2
<-".$a."; source(argv1)' | " ."/usr/bin/R --vanilla --slave";
Nothing worked.
Again when I c...