Package ubic.basecode.util.r
Class JRIClient
- java.lang.Object
-
- ubic.basecode.util.r.AbstractRClient
-
- ubic.basecode.util.r.JRIClient
-
- All Implemented Interfaces:
RClient
public class JRIClient extends AbstractRClient
R connection implementation that uses the dynamic library interface JRI. For this to work the user must have libjri.so or jri.dll and libr.so in their java.library.path.- Author:
- paul
- See Also:
RConnectionFactory
-
-
Field Summary
-
Fields inherited from class ubic.basecode.util.r.AbstractRClient
log
-
-
Constructor Summary
Constructors Constructor Description JRIClient()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassign(String argName, double[] arg)voidassign(String arg0, int[] arg1)voidassign(String sym, String ct)voidassign(String argName, String[] array)voiddisconnect()org.rosuda.REngine.REXPeval(String command)Evaluate the given commandStringgetLastError()booleanisConnected()static booleanready()DoubleMatrix<String,String>retrieveMatrix(String variableName)Get a matrix back out of the R context.voidvoidEval(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
-
-
-
-
Method Detail
-
ready
public static boolean ready()
-
assign
public void assign(String argName, double[] arg)
-
assign
public void assign(String arg0, int[] arg1)
-
disconnect
public void disconnect()
- Specified by:
disconnectin classAbstractRClient
-
eval
public org.rosuda.REngine.REXP eval(String command)
Description copied from interface:RClientEvaluate the given command- Returns:
-
getLastError
public String getLastError()
-
isConnected
public boolean isConnected()
-
retrieveMatrix
public DoubleMatrix<String,String> retrieveMatrix(String variableName)
Description copied from interface:RClientGet 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)
-
-