|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.rosuda.REngine.REXP
org.rosuda.REngine.REXPVector
org.rosuda.REngine.REXPInteger
org.rosuda.REngine.REXPFactor
public class REXPFactor
REXPFactor represents a factor in R. It is an integer vector with levels for each contained category.
| Field Summary |
|---|
| Fields inherited from class org.rosuda.REngine.REXPInteger |
|---|
NA, payload |
| Fields inherited from class org.rosuda.REngine.REXP |
|---|
attr, maxDebugItems |
| Constructor Summary | |
|---|---|
REXPFactor(int[] ids,
java.lang.String[] levels)
create a new factor REXP |
|
REXPFactor(int[] ids,
java.lang.String[] levels,
REXPList attr)
create a new factor REXP |
|
REXPFactor(RFactor factor)
create a new factor REXP from an existing RFactor |
|
REXPFactor(RFactor factor,
REXPList attr)
create a new factor REXP from an existing RFactor |
|
| Method Summary | |
|---|---|
RFactor |
asFactor()
return the contents as a factor - the factor is guaranteed to have index base 1 |
java.lang.Object |
asNativeJavaObject()
attempt to represent the REXP by a native Java object and return it. |
java.lang.String[] |
asStrings()
returns the contents of this vector as strings |
boolean |
isFactor()
check whether the REXP object is a factor |
java.lang.String |
toString()
returns a string description of the object |
| Methods inherited from class org.rosuda.REngine.REXPInteger |
|---|
asDoubles, asIntegers, isInteger, isNA, isNA, isNumeric, length, toDebugString |
| Methods inherited from class org.rosuda.REngine.REXPVector |
|---|
isVector |
| Methods inherited from class org.rosuda.REngine.REXP |
|---|
_attr, asBytes, asDouble, asDoubleMatrix, asInteger, asList, asString, createDataFrame, dim, getAttribute, hasAttribute, inherits, isComplex, isEnvironment, isExpression, isLanguage, isList, isLogical, isNull, isPairList, isRaw, isRecursive, isReference, isString, isSymbol |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public REXPFactor(int[] ids,
java.lang.String[] levels)
ids - indices (one-based!)levels - levels
public REXPFactor(int[] ids,
java.lang.String[] levels,
REXPList attr)
ids - indices (one-based!)levels - levelsattr - attributespublic REXPFactor(RFactor factor)
factor - factor object (can be of any index base, the contents will be pulled with base 1)
public REXPFactor(RFactor factor,
REXPList attr)
factor - factor object (can be of any index base, the contents will be pulled with base 1)attr - attributes| Method Detail |
|---|
public boolean isFactor()
REXPREXP object is a factor
isFactor in class REXPtrue if the receiver is a factor, false otherwisepublic RFactor asFactor()
asFactor in class REXPpublic java.lang.String[] asStrings()
REXPInteger
asStrings in class REXPIntegerpublic java.lang.Object asNativeJavaObject()
REXPint[1] and not Integer).
asNativeJavaObject in class REXPIntegerpublic java.lang.String toString()
REXP
toString in class REXPVectorREXP.asString() for accessing string REXPs)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||