spssdictionary.GetVariableFormat Function (R)
spssdictionary.GetVariableFormat(variable). Returns a string containing the display format 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.
- The character portion of the format string is always returned in all upper case.
- Each format string contains a numeric component after
the format name that indicates the defined width, and optionally,
the number of decimal positions for numeric formats. For example,
A4 is a string format with a maximum width of four bytes, and F8.2
is a standard numeric format with a display format of eight digits,
including two decimal positions and a decimal indicator.
The supported format types are listed in Variable Format Types. To obtain the type code shown in the table, use the GetVariableFormatType function.
Example
varformat <- spssdictionary.GetVariableFormat(0)