public class RList extends REXPAbstract implements REXP
| Modifier and Type | Field and Description |
|---|---|
protected List<Object> |
data |
protected org.apache.commons.logging.Log |
log |
attributes, dataInconsistencyText, engine, indexExceptionText, names, noVariable, variable| Constructor and Description |
|---|
RList(List<String> names,
List<Object> data,
REngine engine,
String variable)
Create the RList with parameters and initialize it in R.
|
RList(REngine engine)
Create a default RList linked to a R engine (the List is not initialized
in R.)
|
RList(String[] names,
List<Object> data,
REngine engine,
String variable)
Create the RList with parameters and initialize it in R.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkX(int x)
Method that check if the index is inside the REXP bounds.
|
Object |
get(int x)
Method to get the object located at the [x] coordinate.
|
List<Object> |
getData()
Method to get the elements of the R list (there is no synchronizing with
R).
|
void |
getFrom(String variable)
Method to get a list from a variable in R.
|
void |
set(int x,
Boolean data)
Method to set the xth object of the list to a value.
|
void |
set(int x,
Double data)
Method to set the xth object of the list to a value.
|
void |
set(int x,
Integer data)
Method to set the xth object of the list to a value.
|
void |
set(int x,
REXP data)
Method to set the xth object of the list to a value.
|
void |
set(int x,
String data)
Method to set the xth object of the list to a value.
|
void |
setData(List<Object> data)
Method to assign the data of the R list.
|
protected void |
setInData(int x,
Object data) |
String |
toRString()
Method to export the list in a String for evaluation in R.
|
protected String |
toRString(int i)
Create the R instruction for element at index i
|
String |
toString() |
checkVariable, getAttribute, getAttributes, getEngine, getName, getNames, getVariable, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setEngine, setName, setNames, setVariableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttribute, getAttributes, getVariable, setAttribute, setAttributespublic RList(REngine engine)
engine - the R engine in which to assign the RList.public RList(List<String> names, List<Object> data, REngine engine, String variable) throws RException
names - the names of each object of the list.data - the list of the objects that compound the RList.engine - the R engine in which to assign the RList.variable - the variable name in R.RException - if an error occur while initializing
the list in R.public RList(String[] names, List<Object> data, REngine engine, String variable) throws RException
names - the names of each object of the list.data - the list of the objects that compound the RList.engine - the R engine in which to assign the RList.variable - the variable name in R.RException - if an error occur while initializing
the list in R.public String toRString() throws RException
toRString in interface REXPRException - If no variable name is givenprotected String toRString(int i) throws RException
i - indexRException - if an error occur creating R instruction for REXPspublic void set(int x,
Double data)
throws RException
x - x coordinate (from 0 to size-1)data - value to setRException - if no variable name has been given to the listpublic void set(int x,
Integer data)
throws RException
x - x coordinate (from 0 to size-1)data - value to setRException - if no variable name has been given to the listpublic void set(int x,
Boolean data)
throws RException
x - x coordinate (from 0 to size-1)data - value to setRException - if no variable name has been given to the listpublic void set(int x,
String data)
throws RException
x - x coordinate (from 0 to size-1)data - value to setRException - if no variable name has been given to the listpublic void set(int x,
REXP data)
throws RException
x - x coordinate (from 0 to size-1)data - value to setRException - if no variable name has been given to the listprotected void setInData(int x,
Object data)
public Object get(int x) throws RException
x - x coordinates (between 0 and size-1)RException - if no variable name has been given to the list and tries to
retrieve data from Rpublic List<Object> getData()
public void setData(List<Object> data) throws RException
data - a List of Objects, containing each element of the R listRException - if cannot communicate with Rpublic void getFrom(String variable) throws RException
getFrom in interface REXPvariable - name of the data.frame in RRExceptionpublic void checkX(int x)
Copyright © 2006–2023 Code Lutin. All rights reserved.