public class RNetEngine extends REngineAbstract implements REngine
-DR.type=net by
-DR.type=net://192.168.99.122:6312 where 192.168.99.122 is the
distant machine adress and 6312 the port on which the server is running.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HOST |
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
RNetEngine() |
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Method to commit all the R expressions stored while in non-autocommit
mode
|
protected RDataFrame |
convertToRDataFrame(org.rosuda.REngine.REXP rexp) |
protected RList |
convertToRList(org.rosuda.REngine.REXP rexp) |
Object |
eval(String expr)
Method to send a R instruction to the engine and get back the result.
|
Object |
evalScript(String expr)
Evaluate a R multi-line expression in R and get back the result.
|
boolean |
init()
Initialize the engine.
|
boolean |
init(String host,
int port)
Method to initialize the connection with specified host and port.
|
void |
terminate()
Terminate the connection with the server.
|
void |
voidEval(String expr)
Method to send a R instruction to the engine without getting back the
result.
|
clearSession, cp, dget, dget, dput, dput, getwd, isAutoCommit, loadRData, loadRData, loadRData, ls, mv, plot, remove, saveRData, saveRData, saveRData, setAutoCommit, setwdpublic static final int DEFAULT_PORT
public static final String DEFAULT_HOST
public boolean init()
init in interface REngineREngine.init()public boolean init(String host, int port)
host - Adress of the Rserve instanceport - Port on which the Rserve instance is listening.public Object eval(String expr) throws RException
eval in interface REngineexpr - the R expression to evaluate.RException - if an error occur while evaluating the
R expression.REngine.eval(java.lang.String)public Object evalScript(String expr) throws RException
evalScript in interface REngineexpr - the R expression to evaluate.RException - if an error occur while trying to evaluate the
expression.REngine.eval(java.lang.String)protected RDataFrame convertToRDataFrame(org.rosuda.REngine.REXP rexp) throws org.rosuda.REngine.REXPMismatchException
org.rosuda.REngine.REXPMismatchExceptionprotected RList convertToRList(org.rosuda.REngine.REXP rexp) throws org.rosuda.REngine.REXPMismatchException
org.rosuda.REngine.REXPMismatchExceptionpublic void terminate()
throws RException
terminate in interface REngineRExceptionREngine.terminate()public void voidEval(String expr) throws RException
voidEval in interface REngineexpr - The R expression to evaluate.RExceptionREngine.voidEval(java.lang.String),
commit()public void commit()
throws RException
commit in interface REngineRException - if an error occur while evaluating one
expression.Copyright © 2006–2018 CodeLutin. All rights reserved.