kieker.tools.util
Class RBridgeControl
java.lang.Object
kieker.tools.util.RBridgeControl
public final class RBridgeControl
- extends java.lang.Object
- Since:
- 1.10
- Author:
- Tillmann Carlos Bielefeld
Method Summary |
void |
assign(java.lang.String variable,
double[] values)
|
void |
assign(java.lang.String variable,
java.lang.Double[] values)
|
void |
assign(java.lang.String variable,
java.lang.Long[] values)
|
double |
eDbl(java.lang.String input)
|
double[] |
eDblArr(java.lang.String input)
|
java.lang.String |
eString(java.lang.String input)
|
java.lang.Object |
evalWithR(java.lang.String input)
Wraps the execution of an arbitrary R expression. |
static RBridgeControl |
getInstance()
Delivers the singleton instance of this class. |
void |
toTS(java.lang.String variable)
|
void |
toTS(java.lang.String variable,
long frequency)
|
static java.lang.String |
uniqueVarname()
Returns a globally unique variable name, even during the access of multiple threads. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RBridgeControl
protected RBridgeControl()
evalWithR
public java.lang.Object evalWithR(java.lang.String input)
throws InvalidREvaluationResultException
- Wraps the execution of an arbitrary R expression. Both errors and results are logged.
- Parameters:
input
- The R expression to evaluate.
- Returns:
- The result or the error of the evaluation of the given R expression. The method tries to convert it into a string, if possible.
- Throws:
InvalidREvaluationResultException
toTS
public void toTS(java.lang.String variable)
throws InvalidREvaluationResultException
- Parameters:
variable
- variable to R
- Throws:
InvalidREvaluationResultException
toTS
public void toTS(java.lang.String variable,
long frequency)
throws InvalidREvaluationResultException
- Parameters:
variable
- variable to Rfrequency
- frequency to R
- Throws:
InvalidREvaluationResultException
eDbl
public double eDbl(java.lang.String input)
- Parameters:
input
- string
- Returns:
Double.NaN
in case of error, else dbvalue
eString
public java.lang.String eString(java.lang.String input)
- Parameters:
input
- inputstring
- Returns:
- Rdata
eDblArr
public double[] eDblArr(java.lang.String input)
- Parameters:
input
- inputstring
- Returns:
- Rdata
assign
public void assign(java.lang.String variable,
double[] values)
throws InvalidREvaluationResultException
- Parameters:
variable
- stringvalues
- assign value
- Throws:
InvalidREvaluationResultException
assign
public void assign(java.lang.String variable,
java.lang.Double[] values)
throws InvalidREvaluationResultException
- Parameters:
variable
- stringvalues
- assign vaules
- Throws:
InvalidREvaluationResultException
assign
public void assign(java.lang.String variable,
java.lang.Long[] values)
throws InvalidREvaluationResultException
- Parameters:
variable
- stringvalues
- assign vaules
- Throws:
InvalidREvaluationResultException
uniqueVarname
public static java.lang.String uniqueVarname()
- Returns a globally unique variable name, even during the access of multiple threads.
- Returns:
- A unique variable name of the form
var_1, var_2, ...
.
getInstance
public static final RBridgeControl getInstance()
- Delivers the singleton instance of this class.
- Returns:
- The singleton instance.
Copyright 2015 Kieker Project, http://kieker-monitoring.net