Here is a PHP library that might help:
https://github.com/kachkaev/php-r
use Kachkaev\PHPR\RCore;
use Kachkaev\PHPR\Engine\CommandLineREngine;
$r = new RCore(new CommandLineREngine('/usr/bin/R'));
$result = $r->run('1 + 1');
echo $result;
This will output:
> 1 + 1
[1] 2
The library is also available as Symfony2 bundle.