/** * Assign a value to a symbol in R * @param string $symbol name of the variable to set (should be compliant with R syntax !) * @param Rserve_REXP $value value to set */ public function assign($symbol, Rserve_REXP $value) { $symbol = (string) $symbol; $data = _rserve_make_data(self::DT_STRING, $symbol); $bin = Rserve_Parser::createBinary($value); $data .= _rserve_make_data(self::DT_SEXP, $bin); $r = $this->sendCommand(self::CMD_assignSEXP, $data); return $r; }
public function setEncoding($encoding) { $this->sendCommand(self::CMD_setEncoding, _rserve_make_data(self::DT_STRING, $encoding)); }