Skip to content
This repository was archived by the owner on Nov 21, 2020. It is now read-only.
This repository was archived by the owner on Nov 21, 2020. It is now read-only.

can not start  #7

@AhmedAly90

Description

@AhmedAly90

i use php-r but it give me an error
Fatal error: Uncaught exception 'Kachkaev\PHPR\Exception\RProcessException' with message '''' is not recognized as an internal or external command, ' in C:\xampp\htdocs\R\src\Kachkaev\PHPR\Process\CommandLineRProcess.php:31 Stack trace: #0 C:\xampp\htdocs\R\src\Kachkaev\PHPR\Process\AbstractRProcess.php(37): Kachkaev\PHPR\Process\CommandLineRProcess->doStart() #1 C:\xampp\htdocs\R\poorman.php(15): Kachkaev\PHPR\Process\AbstractRProcess->start() #2 {main} thrown in C:\xampp\htdocs\R\src\Kachkaev\PHPR\Process\CommandLineRProcess.php on line 31

and my code is to simple
use Kachkaev\PHPR\RCore;
use Kachkaev\PHPR\Engine\CommandLineREngine;
echo "

";
echo "Number values to generate: ";
echo "Number values to generate: ";
echo "";
echo "";
require('src\Kachkaev\PHPR\RCore.php');
require('src\Kachkaev\PHPR\Engine\CommandLineREngine.php');
require_once('src\Kachkaev\PHPR\Engine\AbstractREngine.php');
$r = new RCore(new CommandLineREngine('/usr/bin/R'));
$rProcess = $r->createInteractiveProcess();
+$rProcess->start();
$rProcess->write('x=10');
$rProcess->write('N=10');
$rProcess->write('png(filename="temp.png", width=500, height=500)');
$rProcess->write(' hist(x, col="lightblue")');
$rProcess->write('plot(x,N)');
$rProcess->write('dev.off()');
echo("

");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions