public final class DataFrame extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
addVarByte(String rname,
String vname)
Add a variable of type byte to a data frame.
|
static int |
addVarDouble(String rname,
String vname)
Add a variable of type double to a data frame.
|
static int |
addVarFloat(String rname,
String vname)
Add a variable of type float to a data frame.
|
static int |
addVarInt(String rname,
String vname)
Add a variable of type int to a data frame.
|
static int |
addVarLong(String rname,
String vname)
Add a variable of type long to a data frame.
|
static int |
addVarStr(String rname,
String vname,
int length)
Add a variable of type str to a data frame.
|
static int |
addVarStrL(String rname,
String vname)
Add a variable of type strL to a data frame.
|
static int |
allocate(String rname)
Allocate a new data frame.
|
static int |
free(String rname)
Free a previously allocated data frame.
|
static double |
getNum(String rname,
int var,
long obs)
Read a numeric value from a data frame.
|
static long |
getObsTotal(String rname)
Get the number of observations in a data frame.
|
static String |
getStr(String rname,
int var,
long obs)
Read a string value from a data frame.
|
static int |
getVarCount(String rname)
Get the number of variables in a data frame.
|
static String |
getVarFormat(String rname,
int index)
Get the format for a variable in a data frame.
|
static int |
getVarIndex(String rname,
String varname)
Look up the variable index for the specified name
in the data frame.
|
static String |
getVarName(String rname,
int index)
Get the variable name at a given variable index.
|
static boolean |
isVarTypeStr(String rname,
int index)
Test if a variable is of type str.
|
static boolean |
isVarTypeString(String rname,
int index)
Test if a variable is string or numeric.
|
static boolean |
isVarTypeStrL(String rname,
int index)
Test if a variable is of type strL.
|
static int |
setObsTotal(String rname,
long obs)
Set the number of observations in a data frame.
|
static int |
setVarFormat(String rname,
int index,
String format)
Set the format for a variable in a data frame.
|
static int |
storeNum(String rname,
int var,
long obs,
double value)
Store a numeric value in a data frame.
|
static int |
storeStr(String rname,
int var,
long obs,
String value)
Store a string value in a data frame.
|
public static int addVarByte(String rname, String vname)
rname - Reference name for the data frame.vname - Name of the variable to be created.public static int addVarDouble(String rname, String vname)
rname - Reference name for the data frame.vname - Name of the variable to be created.public static int addVarFloat(String rname, String vname)
rname - Reference name for the data frame.vname - Name of the variable to be created.public static int addVarInt(String rname, String vname)
rname - Reference name for the data frame.vname - Name of the variable to be created.public static int addVarLong(String rname, String vname)
rname - Reference name for the data frame.vname - Name of the variable to be created.public static int addVarStr(String rname, String vname, int length)
rname - Reference name for the data frame.vname - Name of the variable to be created.length - Initial size of the variable. If the length is
greater than Data.getMaxStrLength,
then a variable of type strL will be created.public static int addVarStrL(String rname, String vname)
rname - Reference name for the data frame.vname - Name of the variable to be created.public static int allocate(String rname)
free to return the memory associated
with the data frame to the system.rname - Reference name for the new data frame.public static int free(String rname)
rname - Reference name for the data frame.public static double getNum(String rname, int var, long obs)
rname - Reference name for the data frame.var - Variable to access.obs - Observation to access.public static long getObsTotal(String rname)
rname - Reference name for the data frame.public static String getStr(String rname, int var, long obs)
rname - Reference name for the data frame.var - Variable to access.obs - Observation to access.public static int getVarCount(String rname)
rname - Reference name for the data frame.public static String getVarFormat(String rname, int index)
rname - Reference name for the data frame.index - Index of the variable to look up.public static int getVarIndex(String rname, String varname)
rname - Reference name for the data frame.varname - Name of the variable.public static String getVarName(String rname, int index)
rname - Reference name for the data frame.index - Index of the variable to look up.public static boolean isVarTypeStr(String rname, int index)
rname - Reference name for the data frame.index - The index of the variable to test.public static boolean isVarTypeString(String rname, int index)
rname - Reference name for the data frame.index - The index of the variable to test.public static boolean isVarTypeStrL(String rname, int index)
rname - Reference name for the data frame.index - The index of the variable to test.public static int setObsTotal(String rname, long obs)
rname - Reference name for the data frame.obs - The number of observations to set.public static int setVarFormat(String rname, int index, String format)
rname - Reference name for the data frame.index - Index of the variable to format.format - New format.public static int storeNum(String rname, int var, long obs, double value)
rname - Reference name for the data frame.var - Variable to access.obs - Observation to access.value - Value to store.