Package ubic.basecode.util.r
Class RServeClient
- java.lang.Object
-
- ubic.basecode.util.r.AbstractRClient
-
- ubic.basecode.util.r.RServeClient
-
- All Implemented Interfaces:
RClient
public class RServeClient extends AbstractRClient
- Author:
- pavlidis
-
-
Field Summary
-
Fields inherited from class ubic.basecode.util.r.AbstractRClient
log
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RServeClient()
Gets connection on default host (localhost) and port (6311)protected
RServeClient(String host)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assign(String argName, double[] arg)
void
assign(String arg0, int[] arg1)
void
assign(String sym, String ct)
void
assign(String argName, String[] array)
boolean
connect()
void
disconnect()
org.rosuda.REngine.REXP
eval(String command)
Evaluate the given commandvoid
finalize()
protected static String
findRserveCommand()
String
getLastError()
boolean
isConnected()
DoubleMatrix<String,String>
retrieveMatrix(String variableName)
Get a matrix back out of the R context.void
voidEval(String command)
-
Methods inherited from class ubic.basecode.util.r.AbstractRClient
assignFactor, assignFactor, assignMatrix, assignMatrix, assignMatrix, assignStringList, booleanDoubleArrayEval, dataFrame, dataFrameEval, doubleArrayDoubleArrayEval, doubleArrayEval, doubleArrayTwoDoubleArrayEval, doubleTwoDoubleArrayEval, intArrayEval, linearModel, linearModel, listEval, loadLibrary, loadScript, oneWayAnova, oneWayAnovaEval, remove, rowApplyLinearModel, stringEval, stringListEval, twoWayAnova, twoWayAnovaEval, variableIdentityNumber
-
-
-
-
Constructor Detail
-
RServeClient
protected RServeClient() throws IOException
Gets connection on default host (localhost) and port (6311)- Throws:
IOException
-
RServeClient
protected RServeClient(String host) throws IOException
- Parameters:
host
-- Throws:
IOException
-
-
Method Detail
-
findRserveCommand
protected static String findRserveCommand() throws org.apache.commons.configuration2.ex.ConfigurationException
- Returns:
- Throws:
org.apache.commons.configuration2.ex.ConfigurationException
-
assign
public void assign(String argName, double[] arg)
-
assign
public void assign(String arg0, int[] arg1)
-
connect
public boolean connect()
-
disconnect
public void disconnect()
- Specified by:
disconnect
in classAbstractRClient
-
eval
public org.rosuda.REngine.REXP eval(String command)
Description copied from interface:RClient
Evaluate the given command- Returns:
-
getLastError
public String getLastError()
-
isConnected
public boolean isConnected()
-
retrieveMatrix
public DoubleMatrix<String,String> retrieveMatrix(String variableName)
Description copied from interface:RClient
Get a matrix back out of the R context. Row and Column names are filled in for the resulting object, if they are present.- Returns:
-
voidEval
public void voidEval(String command)
-
-