public class SPSSNumericVariable extends SPSSVariable
| Modifier and Type | Field and Description |
|---|---|
List<Double> |
data
a list of data values used to load the file into memory
|
double |
max |
double |
max_wgt |
double |
mean |
double |
mean_wgt |
double |
min |
double |
min_wgt |
double |
value
a single data value used when reading data from disk
|
categoryMap, valueLabelRecord, variableRecord| Constructor and Description |
|---|
SPSSNumericVariable(SPSSFile file)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
SPSSVariableCategory |
addCategory(byte[] byteValue,
String label)
Adds a category to the variable based on a byte[8] value
|
SPSSVariableCategory |
addCategory(double value,
String label)
Adds a category to the variable based on a double value
|
SPSSVariableCategory |
getCategory(byte[] byteValue)
Gets a category for this variable based on a byte[8] value
|
SPSSVariableCategory |
getCategory(double value)
Gets a category for this variable based on a double value
|
int |
getNumberOfObservations() |
String |
getSPSSFormat() |
double |
getValueAsDouble(int obsNumber)
Returns an observation value as a double.
|
String |
getValueAsString(int obsNumber,
FileFormatInfo dataFormat)
Returns an observation value as a string based on the specified data ad
variable format.
|
String |
valueToString(double value)
Converts a numeric value (float) into a string representation based on
the variable formatting.
|
getAlignmentLabel, getDDI2, getDDI2, getDDI3CategoryScheme, getDDI3CodeScheme, getDDI3DataItem, getDDI3DataType, getDDI3DefaultCategorySchemeID, getDDI3DefaultCodeSchemeID, getDDI3ProprietaryDataItem, getDDI3RepresentationType, getDDI3Variable, getDecimals, getLabel, getLength, getLength, getMeasureLabel, getName, getNumber, getShortName, hasValueLabels, isDate, isMissingValueCode, isMissingValueCodepublic double value
public double min
public double max
public double mean
public double min_wgt
public double max_wgt
public double mean_wgt
public SPSSNumericVariable(SPSSFile file)
public int getNumberOfObservations()
getNumberOfObservations in class SPSSVariablepublic SPSSVariableCategory addCategory(byte[] byteValue, String label) throws SPSSFileException
addCategory in class SPSSVariableSPSSFileExceptionpublic SPSSVariableCategory addCategory(double value, String label) throws SPSSFileException
SPSSFileExceptionpublic SPSSVariableCategory getCategory(byte[] byteValue) throws SPSSFileException
getCategory in class SPSSVariableSPSSFileExceptionpublic SPSSVariableCategory getCategory(double value) throws SPSSFileException
SPSSFileExceptionpublic String getSPSSFormat()
getSPSSFormat in class SPSSVariablepublic double getValueAsDouble(int obsNumber)
throws SPSSFileException
obsNumber - the record. Either 0 or between 1 and the number of
observationsSPSSFileExceptionpublic String getValueAsString(int obsNumber, FileFormatInfo dataFormat) throws SPSSFileException
getValueAsString in class SPSSVariableobsNumber - the record. Either 0 or between 1 and the number of
observationsdataFormat - the file formatSPSSFileExceptionpublic String valueToString(double value) throws SPSSFileException
value - the value to formatSPSSFileException - if an unknown write format type is foundCopyright © 2016. All rights reserved.