org.af.jhlir.call
Interface RFactor<WRAPPED_TYPE>

All Superinterfaces:
RObj<WRAPPED_TYPE>, RVectorFactor<WRAPPED_TYPE,String[],String>

public interface RFactor<WRAPPED_TYPE>
extends RVectorFactor<WRAPPED_TYPE,String[],String>


Method Summary
 int getCode(int i)
          Get integer code for elements i of this factor (index into level array, zero-based).
 int[] getCodes()
          Get integer codes for all elements of this factor (indices into level array, zero-based).
 String[] getData()
          Returns an array containing all of the elements in this vector/factor in proper sequence
 List<String> getDataAsList()
          Returns a list containing all of the elements in this vector/factor in proper sequence
 String[] getDataAsObjArr()
          Returns an array containing all of the elements in this vector/factor in proper sequence.
 String[] getLevels()
          Get factor levels as String array.
 List<String> getLevelsAsList()
          Get factor levels as List of Strings.
 
Methods inherited from interface org.af.jhlir.call.RVectorFactor
get, getLength, getName, getNames, getNamesAsList, isNA
 
Methods inherited from interface org.af.jhlir.call.RObj
asRChar, asRDataFrame, asREnvironment, asRFactor, asRInteger, asRList, asRLogical, asRMatrixDouble, asRNumeric, asS3Obj, getWrapped
 

Method Detail

getData

String[] getData()
Description copied from interface: RVectorFactor
Returns an array containing all of the elements in this vector/factor in proper sequence

Specified by:
getData in interface RVectorFactor<WRAPPED_TYPE,String[],String>
Returns:
an array containing all of the elements in this vector/factor in proper sequence

getDataAsObjArr

String[] getDataAsObjArr()
Description copied from interface: RVectorFactor
Returns an array containing all of the elements in this vector/factor in proper sequence. If getData() returns an array of primitives, this methods converts to an array of Java Objects. Note that this takes linear time for long arrays.

Specified by:
getDataAsObjArr in interface RVectorFactor<WRAPPED_TYPE,String[],String>
Returns:
an array containing all of the elements in this vector/factor in proper sequence

getDataAsList

List<String> getDataAsList()
Description copied from interface: RVectorFactor
Returns a list containing all of the elements in this vector/factor in proper sequence

Specified by:
getDataAsList in interface RVectorFactor<WRAPPED_TYPE,String[],String>
Returns:
a list containing all of the elements in this vector/factor in proper sequence

getLevels

String[] getLevels()
Get factor levels as String array.

Returns:
factor levels as String array.

getLevelsAsList

List<String> getLevelsAsList()
Get factor levels as List of Strings.

Returns:
factor levels as List of Strings.

getCodes

int[] getCodes()
Get integer codes for all elements of this factor (indices into level array, zero-based).

Returns:
integer codes for all elements of this factor.

getCode

int getCode(int i)
Get integer code for elements i of this factor (index into level array, zero-based).

Returns:
integer code for element i.