edu.ucla.stat.SOCR.JRI
Class REXP

java.lang.Object
  extended by edu.ucla.stat.SOCR.JRI.REXP

public class REXP
extends java.lang.Object


Field Summary
static int ANYSXP
           
static int BCODESXP
           
static int BUILTINSXP
           
static int CHARSXP
           
static int CLOSXP
           
static int CPLXSXP
           
static int DOTSXP
           
static int ENVSXP
           
static int EXPRSXP
           
static int EXTPTRSXP
           
static int FUNSXP
           
static int INTSXP
           
static int LANGSXP
           
static int LGLSXP
           
static int LISTSXP
           
static int NILSXP
           
static int PROMSXP
           
static int REALSXP
           
 int rtype
          native type of the represented expression (see ...SXP constants in R).
static int SPECIALSXP
           
static int STRSXP
           
static int SYMSXP
           
static int VECSXP
           
static int WEAKREFSXP
           
 long xp
          native reference to the SEXP represented in R.
static int XT_DOUBLEARRAY
           
static int XT_INTARRAY
           
static int XT_STR
           
static int XT_STRARRAY
           
 
Constructor Summary
REXP(Rengine re, long exp)
          create a REXP directly from a R SEXP reference.
 
Method Summary
 double[] asDoubleArray()
           
 int[] asIntArray()
           
 java.lang.String asString()
           
 java.lang.String[] asStringArray()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XT_STR

public static final int XT_STR
See Also:
Constant Field Values

XT_STRARRAY

public static final int XT_STRARRAY
See Also:
Constant Field Values

XT_INTARRAY

public static final int XT_INTARRAY
See Also:
Constant Field Values

XT_DOUBLEARRAY

public static final int XT_DOUBLEARRAY
See Also:
Constant Field Values

NILSXP

public static final int NILSXP
See Also:
Constant Field Values

SYMSXP

public static final int SYMSXP
See Also:
Constant Field Values

LISTSXP

public static final int LISTSXP
See Also:
Constant Field Values

CLOSXP

public static final int CLOSXP
See Also:
Constant Field Values

ENVSXP

public static final int ENVSXP
See Also:
Constant Field Values

PROMSXP

public static final int PROMSXP
See Also:
Constant Field Values

LANGSXP

public static final int LANGSXP
See Also:
Constant Field Values

SPECIALSXP

public static final int SPECIALSXP
See Also:
Constant Field Values

BUILTINSXP

public static final int BUILTINSXP
See Also:
Constant Field Values

CHARSXP

public static final int CHARSXP
See Also:
Constant Field Values

LGLSXP

public static final int LGLSXP
See Also:
Constant Field Values

INTSXP

public static final int INTSXP
See Also:
Constant Field Values

REALSXP

public static final int REALSXP
See Also:
Constant Field Values

CPLXSXP

public static final int CPLXSXP
See Also:
Constant Field Values

STRSXP

public static final int STRSXP
See Also:
Constant Field Values

DOTSXP

public static final int DOTSXP
See Also:
Constant Field Values

ANYSXP

public static final int ANYSXP
See Also:
Constant Field Values

VECSXP

public static final int VECSXP
See Also:
Constant Field Values

EXPRSXP

public static final int EXPRSXP
See Also:
Constant Field Values

BCODESXP

public static final int BCODESXP
See Also:
Constant Field Values

EXTPTRSXP

public static final int EXTPTRSXP
See Also:
Constant Field Values

WEAKREFSXP

public static final int WEAKREFSXP
See Also:
Constant Field Values

FUNSXP

public static final int FUNSXP
See Also:
Constant Field Values

xp

public long xp
native reference to the SEXP represented in R. It's usually a pointer, but can be any handle obtained from the engine. This reference can be used when calling RNI commands directly.


rtype

public int rtype
native type of the represented expression (see ...SXP constants in R). Please note that this type is cached and may have changed in the meantime. If the possibility of changing type exists (mainly list/lang) then use rniExpType to make sure

Constructor Detail

REXP

public REXP(Rengine re,
            long exp)
create a REXP directly from a R SEXP reference. SEXP types STRSXP, INTSXP and REALSXP are automatically converted. All others are represented as SEXP references only.

Method Detail

asString

public java.lang.String asString()

asStringArray

public java.lang.String[] asStringArray()

asDoubleArray

public double[] asDoubleArray()

asIntArray

public int[] asIntArray()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object