org.nuiton.j2r.types
Interface REXP

All Known Implementing Classes:
RDataFrame, REXPAbstract, RList

public interface REXP

This interface is the common part of all complex R types.

Author:
couteau

Method Summary
 void checkX(int x)
          Method that check if the index is inside the REXP bounds.
 java.lang.Object getAttribute(java.lang.String attribute)
          Method to get the value of an attribute (there is no synchronizing with R, use the update() method to synchronize data with R before using this method if you think data may have changed.
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Method to get all the attributes of the data.frame (there is no synchronizing with R, use the update() method to synchronize data with R before using this method if you think data may have changed.
 void getFrom(java.lang.String variable)
          Method to get a data.frame from a variable in R.
 java.lang.String getVariable()
          Method to get the variable name of the REXP
 void setAttribute(java.lang.String attribute, java.lang.Object value)
          Method to set the value of an attribute (there is no synchronizing with R, use the commit() method to send data to R.
 void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
          Method to set all the attributes of the data.frame (there is no synchronizing with R, use the commit() method to send data to R.
 java.lang.String toRString()
          Method to export the R object in a String for evaluation in R.
 

Method Detail

toRString

java.lang.String toRString()
                           throws RException
Method to export the R object in a String for evaluation in R.

Returns:
a String to create the R object in R.
Throws:
RException

getFrom

void getFrom(java.lang.String variable)
             throws RException
Method to get a data.frame from a variable in R.

Parameters:
variable - name of the data.frame in R
engine - a REngine where the R session is located.
Throws:
RException

setAttributes

void setAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
                   throws RException
Method to set all the attributes of the data.frame (there is no synchronizing with R, use the commit() method to send data to R.

Parameters:
attributes - a Map containing the attributes (key) and values (value) (values are a R expression, String may be rounded with escaped quote like : \"this is a R string\" ).
Throws:
RException

getAttributes

java.util.Map<java.lang.String,java.lang.Object> getAttributes()
                                                               throws RException
Method to get all the attributes of the data.frame (there is no synchronizing with R, use the update() method to synchronize data with R before using this method if you think data may have changed.

Returns:
a Map containing the attributes (key) and values (value)
Throws:
RException

getAttribute

java.lang.Object getAttribute(java.lang.String attribute)
                              throws RException
Method to get the value of an attribute (there is no synchronizing with R, use the update() method to synchronize data with R before using this method if you think data may have changed.

Parameters:
attribute - name of the attribute
Returns:
the attribute value
Throws:
RException

setAttribute

void setAttribute(java.lang.String attribute,
                  java.lang.Object value)
                  throws RException
Method to set the value of an attribute (there is no synchronizing with R, use the commit() method to send data to R.

Parameters:
attribute - name of the attribute
value - the value to be set (this is a R expression, String may be rounded with escaped quote like : \"this is a R string\" ).
Throws:
RException

getVariable

java.lang.String getVariable()
Method to get the variable name of the REXP

Returns:
the variable name of the REXP in R

checkX

void checkX(int x)
Method that check if the index is inside the REXP bounds.

Parameters:
x - index


Copyright © 2006-2009 CodeLutin. All Rights Reserved.