java.lang.Objectorg.rosuda.REngine.REngine
ru.biosoft.plugins.jri.RObjectSupport
ru.biosoft.plugins.jri.RServeRObject
public class RServeRObject
RObject implementation to work with locally installer R application via rserve
| Field Summary | |
|---|---|
static java.lang.String |
transferCharset
This static variable specifies the character set used to encode string for transfer. |
| Constructor Summary | |
|---|---|
RServeRObject()
make a new local connection on default port (6311) |
|
RServeRObject(java.lang.String host)
make a new connection to specified host on default port (6311) |
|
RServeRObject(java.lang.String host,
int port)
make a new connection to specified host and given port. |
|
| Method Summary | |
|---|---|
void |
assign(java.lang.String sym,
org.rosuda.REngine.REXP rexp)
assign a content of a REXP to a symbol in R. |
void |
assign(java.lang.String symbol,
org.rosuda.REngine.REXP value,
org.rosuda.REngine.REXP env)
assign into an environment |
void |
assign(java.lang.String sym,
java.lang.String ct)
|
boolean |
close()
closes current connection |
static RObject |
createObject()
|
org.rosuda.REngine.REXP |
createReference(org.rosuda.REngine.REXP ref)
|
org.rosuda.REngine.REXP |
eval(org.rosuda.REngine.REXP what,
org.rosuda.REngine.REXP where,
boolean resolve)
|
org.rosuda.REngine.REXP |
eval(java.lang.String cmd)
Evaluate expression and return result object |
void |
finalize()
|
void |
finalizeReference(org.rosuda.REngine.REXP ref)
|
org.rosuda.REngine.REXP |
get(java.lang.String symbol,
org.rosuda.REngine.REXP env,
boolean resolve)
get a value from an environment |
org.rosuda.REngine.REXP |
getParentEnvironment(org.rosuda.REngine.REXP env,
boolean resolve)
|
boolean |
isAvailable()
|
org.rosuda.REngine.REXP |
newEnvironment(org.rosuda.REngine.REXP parent,
boolean resolve)
|
org.rosuda.REngine.REXP |
parse(java.lang.String text,
boolean resolve)
|
org.rosuda.REngine.REXP |
parseAndEval(java.lang.String text,
org.rosuda.REngine.REXP where,
boolean resolve)
|
org.rosuda.REngine.REXP |
resolveReference(org.rosuda.REngine.REXP ref)
fetch the contents of the given reference. |
java.lang.String |
toString()
|
void |
voidEval(java.lang.String cmd)
Evaluate expression and return messages |
| Methods inherited from class ru.biosoft.plugins.jri.RObjectSupport |
|---|
assignObject, getREXPObject, help, newSession, openSession, saveSession, setEnvironmentProvider |
| Methods inherited from class org.rosuda.REngine.REngine |
|---|
assign, assign, assign, assign, engineForClass, getLastEngine, parseAndEval, supportsEnvironemnts, supportsReferences, supportsREPL |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String transferCharset
| Constructor Detail |
|---|
public RServeRObject()
throws RserveException
RserveException
public RServeRObject(java.lang.String host)
throws RserveException
host - host name/IP
RserveException
public RServeRObject(java.lang.String host,
int port)
throws RserveException
#isConnected to ensure the connection was successfully created.
host - host name/IPport - TCP port
RserveException| Method Detail |
|---|
public static RObject createObject()
public boolean isAvailable()
public void finalize()
finalize in class java.lang.Objectpublic boolean close()
close in class org.rosuda.REngine.REngine
public org.rosuda.REngine.REXP parse(java.lang.String text,
boolean resolve)
throws org.rosuda.REngine.REngineException
parse in class org.rosuda.REngine.REngineorg.rosuda.REngine.REngineException
public org.rosuda.REngine.REXP eval(org.rosuda.REngine.REXP what,
org.rosuda.REngine.REXP where,
boolean resolve)
throws org.rosuda.REngine.REngineException
eval in class org.rosuda.REngine.REngineorg.rosuda.REngine.REngineException
public org.rosuda.REngine.REXP parseAndEval(java.lang.String text,
org.rosuda.REngine.REXP where,
boolean resolve)
throws org.rosuda.REngine.REngineException
parseAndEval in class org.rosuda.REngine.REngineorg.rosuda.REngine.REngineException
public void assign(java.lang.String symbol,
org.rosuda.REngine.REXP value,
org.rosuda.REngine.REXP env)
throws org.rosuda.REngine.REngineException
assign in class RObjectSupportsymbol - symbol namevalue - value to assignenv - environment to assign to
org.rosuda.REngine.REngineException
public void assign(java.lang.String sym,
java.lang.String ct)
throws RserveException
assign in class org.rosuda.REngine.REngineRserveException
public void assign(java.lang.String sym,
org.rosuda.REngine.REXP rexp)
throws RserveException
assign in class org.rosuda.REngine.REnginesym - symbol name. Currently assign uses CMD_setSEXP command of Rserve, i.e. the symbol value is NOT parsed. It is the responsibility of the user to make sure that the symbol name is valid in R (recall the difference between a symbol and an expression!). In fact R will always create the symbol, but it may not be accessible (examples: "bar\nfoo" or "bar$foo").rexp - contents
RserveException
public org.rosuda.REngine.REXP get(java.lang.String symbol,
org.rosuda.REngine.REXP env,
boolean resolve)
throws org.rosuda.REngine.REngineException
get in class org.rosuda.REngine.REnginesymbol - symbol nameenv - environmentresolve - resolve the resulting REXP or just return a reference
org.rosuda.REngine.REngineException
public org.rosuda.REngine.REXP resolveReference(org.rosuda.REngine.REXP ref)
throws org.rosuda.REngine.REngineException
resolveReference in class org.rosuda.REngine.REngineref - reference to resolve
org.rosuda.REngine.REngineException
public org.rosuda.REngine.REXP createReference(org.rosuda.REngine.REXP ref)
throws org.rosuda.REngine.REngineException
createReference in class org.rosuda.REngine.REngineorg.rosuda.REngine.REngineException
public void finalizeReference(org.rosuda.REngine.REXP ref)
throws org.rosuda.REngine.REngineException
finalizeReference in class org.rosuda.REngine.REngineorg.rosuda.REngine.REngineException
public org.rosuda.REngine.REXP getParentEnvironment(org.rosuda.REngine.REXP env,
boolean resolve)
throws org.rosuda.REngine.REngineException
getParentEnvironment in class org.rosuda.REngine.REngineorg.rosuda.REngine.REngineException
public org.rosuda.REngine.REXP newEnvironment(org.rosuda.REngine.REXP parent,
boolean resolve)
throws org.rosuda.REngine.REngineException
newEnvironment in class org.rosuda.REngine.REngineorg.rosuda.REngine.REngineExceptionpublic org.rosuda.REngine.REXP eval(java.lang.String cmd)
RObject
public void voidEval(java.lang.String cmd)
RObject
public java.lang.String toString()
toString in class org.rosuda.REngine.REngine