|
|||||||||
| 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
public class REXPInteger
REXPDouble represents a vector of integer values.
| Field Summary | |
|---|---|
static int |
NA
NA integer value as defined in R. |
protected int[] |
payload
|
| Fields inherited from class org.rosuda.REngine.REXP |
|---|
attr, maxDebugItems |
| Constructor Summary | |
|---|---|
REXPInteger(int load)
create integer vector of the length 1 with the given value as its first (and only) element |
|
REXPInteger(int[] load)
create integer vector with the payload specified by load |
|
REXPInteger(int[] load,
REXPList attr)
create integer vector with the payload specified by load and attributes attr |
|
| Method Summary | |
|---|---|
double[] |
asDoubles()
returns the contents of this vector as doubles |
int[] |
asIntegers()
returns the contents as an array of integers (if supported by the represented object) |
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 |
isInteger()
check whether the REXP object is an integer vector |
boolean[] |
isNA()
returns a boolean vector of the same length as this vector with true for NA values and false for any other values |
static boolean |
isNA(int value)
|
boolean |
isNumeric()
check whether the REXP object is a numeric vector |
int |
length()
returns the length of the vector (i.e. the number of elements) |
java.lang.String |
toDebugString()
returns representation that it useful for debugging (e.g. it includes attributes and may include vector values -- see REXP.maxDebugItems) |
| Methods inherited from class org.rosuda.REngine.REXPVector |
|---|
isVector, toString |
| Methods inherited from class org.rosuda.REngine.REXP |
|---|
_attr, asBytes, asDouble, asDoubleMatrix, asFactor, asInteger, asList, asString, createDataFrame, createDoubleMatrix, dim, getAttribute, hasAttribute, inherits, isComplex, isEnvironment, isExpression, isFactor, 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 |
| Field Detail |
|---|
protected int[] payload
public static final int NA
isNA(int) is provided for consistency.
| Constructor Detail |
|---|
public REXPInteger(int load)
public REXPInteger(int[] load)
load
public REXPInteger(int[] load,
REXPList attr)
load and attributes attr
| Method Detail |
|---|
public static boolean isNA(int value)
public java.lang.Object asNativeJavaObject()
REXPint[1] and not Integer).
asNativeJavaObject in class REXPpublic int length()
REXPVector
length in class REXPVectorpublic boolean isInteger()
REXPREXP object is an integer vector
isInteger in class REXPtrue if the receiver is an integer vector, false otherwisepublic boolean isNumeric()
REXPREXP object is a numeric vector
isNumeric in class REXPtrue if the receiver is a numeric vector, false otherwisepublic int[] asIntegers()
REXP
asIntegers in class REXPpublic double[] asDoubles()
asDoubles in class REXPpublic java.lang.String[] asStrings()
asStrings in class REXPpublic boolean[] isNA()
REXPVectortrue for NA values and false for any other values
isNA in class REXPVectortrue for NA values and false for any other valuespublic java.lang.String toDebugString()
REXPREXP.maxDebugItems)
toDebugString in class REXPVector
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||