|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.JRclient.RFactor
representation of a factor variable. In R there is no actual xpression type called "factor", instead it is coded as an int vector with a list attribute. The parser code of REXP converts such constructs directly into the RFactor objects and defines an own XT_FACTOR type
Constructor Summary | |
RFactor()
create a new, empty factor var |
|
RFactor(int[] i,
String[] v)
create a new factor variable, based on the supplied arrays. |
|
RFactor(int[] i,
Vector v)
special constructor used by REXP parser to save some re-indexing and performing automatic index conversion |
Method Summary | |
void |
add(String v)
add a new element (by name) |
String |
at(int i)
returns name for a specific ID |
int |
size()
returns the number of caes |
String |
toString()
displayable representation of the factor variable |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RFactor()
public RFactor(int[] i, String[] v)
i
- array if IDs (0..v.length-1)v
- values - cotegory namespublic RFactor(int[] i, Vector v)
i
- index arrayv
- vector of xpressions which should be all stringsMethod Detail |
public void add(String v)
v
- valuepublic String at(int i)
i
- ID
public int size()
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |