|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.REngine.REXP org.rosuda.REngine.REXPVector org.rosuda.REngine.REXPDouble
public class REXPDouble
REXPDouble represents a vector of double precision floating point values.
Field Summary | |
---|---|
static double |
NA
NA real value as defined in R. |
Fields inherited from class org.rosuda.REngine.REXP |
---|
attr, maxDebugItems |
Constructor Summary | |
---|---|
REXPDouble(double load)
create real vector of the length 1 with the given value as its first (and only) element |
|
REXPDouble(double[] load)
|
|
REXPDouble(double[] load,
REXPList attr)
|
Method Summary | |
---|---|
double[] |
asDoubles()
returns the values represented by this vector |
int[] |
asIntegers()
converts the values of this vector into integers by cast |
java.lang.Object |
asNativeJavaObject()
attempt to represent the REXP by a native Java object and return it. |
java.lang.String[] |
asStrings()
converts the values of this vector into strings |
boolean[] |
isNA()
returns a boolean vector of the same length as this vector with true for NA values and false for any other values (including NaNs) |
static boolean |
isNA(double value)
checks whether a given double value is a NA representation in R. |
boolean |
isNumeric()
return true |
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, isInteger, 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 |
---|
public static final double NA
isNA(double)
instead.
Constructor Detail |
---|
public REXPDouble(double load)
public REXPDouble(double[] load)
public REXPDouble(double[] load, REXPList attr)
Method Detail |
---|
public static boolean isNA(double value)
public int length()
REXPVector
length
in class REXPVector
public java.lang.Object asNativeJavaObject()
REXP
int[1]
and not Integer
).
asNativeJavaObject
in class REXP
public boolean isNumeric()
true
isNumeric
in class REXP
true
if the receiver is a numeric vector, false
otherwisepublic double[] asDoubles()
asDoubles
in class REXP
public int[] asIntegers()
asIntegers
in class REXP
public java.lang.String[] asStrings()
asStrings
in class REXP
public boolean[] isNA()
true
for NA values and false
for any other values (including NaNs)
isNA
in class REXPVector
true
for NA values and false
for any other valuespublic java.lang.String toDebugString()
REXP
REXP.maxDebugItems
)
toDebugString
in class REXPVector
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |