spssdictionary.GetVariableType Function (R)

spssdictionary.GetVariableType(variable). Returns 0 for numeric variables or the defined length for string variables for the specified variable in the active dataset. The argument is the name of the variable in quotes or the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

Example

vartype <- spssdictionary.GetVariableType(0)