|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.j2r.types.REXPAbstract
org.nuiton.j2r.types.RList
public class RList
Java implementation of the R List.
| Field Summary |
|---|
| Fields inherited from class org.nuiton.j2r.types.REXPAbstract |
|---|
attributes, dataInconsistencyText, engine, indexExceptionText, names, noVariable, variable |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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,
Object 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. |
String |
toRString()
Method to export the list in a String for evaluation in R. |
| Methods inherited from class org.nuiton.j2r.types.REXPAbstract |
|---|
checkVariable, getAttribute, getAttributes, getEngine, getName, getNames, getVariable, setAttribute, setAttributes, setEngine, setName, setNames, setVariable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.nuiton.j2r.types.REXP |
|---|
getAttribute, getAttributes, getVariable, setAttribute, setAttributes |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
public String toRString()
throws RException
toRString in interface REXPRException - If no variable name is given
public void set(int x,
Object data)
throws RException
x - x coordinate (from 0 to size-1)data - value to set
RException - if no variable name has been given to the list
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 listpublic List<Object> getData()
public void setData(List<Object> data)
throws RException
data - a List of Objects, containing each element of the R list
RException
public void getFrom(String variable)
throws RException
getFrom in interface REXPvariable - name of the data.frame in R
RExceptionpublic void checkX(int x)
checkX in interface REXPx - index
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||