public abstract class REXPAbstract extends Object implements REXP
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
attributes |
protected String |
dataInconsistencyText |
protected REngine |
engine |
protected String |
indexExceptionText |
protected List<String> |
names |
protected String |
noVariable |
protected String |
variable |
Constructor and Description |
---|
REXPAbstract() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkVariable()
Test that the variable name has been set so that the REXP can be sent to
R.
|
Object |
getAttribute(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.
|
Map<String,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.
|
REngine |
getEngine()
Method to get the engine used by the REXP
|
String |
getName(int x)
Method to get the name of the ArrayList that is at this x index of the R
data.frame.
|
List<String> |
getNames()
Method to get the names of the ArrayLists of the R data.frame.
|
String |
getVariable()
Method to get the variable name of the REXP
|
void |
setAttribute(String attribute,
Boolean value) |
void |
setAttribute(String attribute,
Double value) |
void |
setAttribute(String attribute,
Integer value) |
void |
setAttribute(String attribute,
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 |
setAttribute(String attribute,
REXP value) |
void |
setAttribute(String attribute,
String value) |
void |
setAttributes(Map<String,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.
|
void |
setEngine(REngine engine)
Method to set the engine used by the REXP.
|
void |
setName(int x,
String name)
Method to assign the name of the Object at the index x.
|
void |
setNames(List<String> names)
Method to assign names of the complex REXP objects.
|
void |
setVariable(String variable)
Method to set the R expression variable name
|
protected String variable
protected REngine engine
protected String indexExceptionText
protected String dataInconsistencyText
protected String noVariable
public void setAttributes(Map<String,Object> attributes) throws RException
setAttributes
in interface REXP
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\" ).RException
public Map<String,Object> getAttributes() throws RException
getAttributes
in interface REXP
RException
public Object getAttribute(String attribute) throws RException
getAttribute
in interface REXP
attribute
- name of the attributeRException
public void setAttribute(String attribute, Object value) throws RException
setAttribute
in interface REXP
attribute
- name of the attributevalue
- the value to be set (this is a R expression, String may be
rounded with escaped quote like : \"this is a R string\" ).RException
public void setAttribute(String attribute, Double value) throws RException
RException
public void setAttribute(String attribute, Integer value) throws RException
RException
public void setAttribute(String attribute, Boolean value) throws RException
RException
public void setAttribute(String attribute, String value) throws RException
RException
public void setAttribute(String attribute, REXP value) throws RException
RException
public String getVariable()
getVariable
in interface REXP
public void setVariable(String variable) throws RException
variable
- the new variable nameRException
- if something wrong happen while assigning the R expression to
the new variable in R.public List<String> getNames() throws RException
RException
- if an error occurs while getting back the names from R.IndexOutOfBoundsException
- when the row.names size get from R is bigger than the local
data size.public String getName(int x) throws RException
x
- index of the ArrayList (0 to n-1)RException
- if an error occurs while getting back the name from R.IndexOutOfBoundsException
- if the x index is out of bounds.protected void checkVariable() throws RException
RException
- if the variable name have not been set.public void setEngine(REngine engine) throws RException
engine
- Engine to be setRException
- If an error occur while assigning the list to the new
REngine.public REngine getEngine()
public void setNames(List<String> names) throws RException
names
- a ArrayList containing the names of the REXP.RException
- when the names list is longer than the REXP length.public void setName(int x, String name) throws RException
x
- index of the object (0 to n-1)name
- Name of the object.RException
- if an error occur while in RCopyright © 2006–2018 CodeLutin. All rights reserved.