I'm in need import libraries in my R code, but is giving the following error.
$rOutputParser = new ROutputParser();
$rProcess = $r->createInteractiveProcess();
$rProcess->start();
$resultado = "a";
$rProcess->write(<<<EOF
require("sm",lib.loc="/Library/Frameworks/R.framework/Resources/library/")
EOF
);
var_dump($rProcess->getErrors());
Result:
array (1) {
[0] =>
object (Kachkaev \ PHPR \ RError) # 77 (4) {
["inputLineNumber": "Kachkaev \ PHPR \ RError": private] =>
int (0)
["commandNumber": "Kachkaev \ PHPR \ RError": private] =>
int (0)
["command", "Kachkaev \ PHPR \ RError": private] =>
string (90) "require (" sm "lib.loc =" / Library / Frameworks / R.framework / Resources / library / ")"
["errorMessage": "Kachkaev \ PHPR \ RError": private] =>
string (97) "Loading required package: sm
Package 'sm', version 2.2-5.4: type help (sm) is summary information "
}
}
I'm in need import libraries in my R code, but is giving the following error.
Result: