org.af.jhlir.call
Class RCallServices

java.lang.Object
  extended by org.af.jhlir.call.RCallServices

public abstract class RCallServices
extends Object


Field Summary
static String NA_CHAR
          String value that codes a NA for a character
static String NA_FACTOR
          String value that codes a NA for a factor
static Integer NA_RINTEGER
          Integer value that codes a NA
static Boolean NA_RLOGICAL
          Boolean value that codes a NA
static Double NA_RNUMERIC
          Double value that codes a NA
 
Constructor Summary
RCallServices()
           
 
Method Summary
abstract  void assign(String varName, String expression)
          Assigns the result of evaluating the expression to a variable.
abstract  RObj call(String function, Object... args)
          Calls a function with the given arguments.
abstract  RObj eval(String expression)
          Evaluates an expression and returns the result.
abstract  RRef evalAndGetRef(String expression)
          Evaluates an expression and returns the result as a reference.
abstract  void evalVoid(String expression)
          Evaluates an expression.
abstract  String[] getWarning()
          If there was generated at least one warning on R side by the last eval, evalVoid, evalAndGetRef,assign, call or put command, this method returns the warnings.
abstract  void put(String varName, Object obj)
          TODO
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NA_RINTEGER

public static Integer NA_RINTEGER
Integer value that codes a NA


NA_RNUMERIC

public static Double NA_RNUMERIC
Double value that codes a NA


NA_RLOGICAL

public static Boolean NA_RLOGICAL
Boolean value that codes a NA


NA_CHAR

public static String NA_CHAR
String value that codes a NA for a character


NA_FACTOR

public static String NA_FACTOR
String value that codes a NA for a factor

Constructor Detail

RCallServices

public RCallServices()
Method Detail

evalVoid

public abstract void evalVoid(String expression)
                       throws REngineException
Evaluates an expression.

Parameters:
expression -
Throws:
REngineException

eval

public abstract RObj eval(String expression)
                   throws REngineException
Evaluates an expression and returns the result.

Parameters:
expression - expression to be evaluated
Returns:
the result of evaluating the expression
Throws:
REngineException

evalAndGetRef

public abstract RRef evalAndGetRef(String expression)
                            throws RemoteException
Evaluates an expression and returns the result as a reference.

Parameters:
expression - expression to be evaluated
Returns:
a reference to the result of evaluating the expression
Throws:
RemoteException

assign

public abstract void assign(String varName,
                            String expression)
                     throws RemoteException
Assigns the result of evaluating the expression to a variable.

Parameters:
varName - variable name that the result should be assigned to
expression - expression to be evaluated
Throws:
RemoteException

call

public abstract RObj call(String function,
                          Object... args)
                   throws RemoteException
Calls a function with the given arguments. The arguments can be of Type RObj ... TODO What is allowed to pass here?

Parameters:
function - name of the function to be called
args - arguments to be part of the call
Throws:
RemoteException

put

public abstract void put(String varName,
                         Object obj)
                  throws REngineException
TODO

Parameters:
varName -
obj -
Throws:
RemoteException
REngineException

getWarning

public abstract String[] getWarning()
If there was generated at least one warning on R side by the last eval, evalVoid, evalAndGetRef,assign, call or put command, this method returns the warnings. Otherwise it returns null.

Returns:
the warnings and null if no warning was generated.