Variable Names (OMS command)
OMS
constructs
valid, unique variable names from column labels.
- Row and layer elements are assigned generic variable
names: the prefix
Var
followed by a sequential number. - Characters that aren't allowed in variable names, such as spaces and parentheses, are removed. For example, "This (Column) Label" would become a variable named ThisColumnLabel.
- If the label begins with a character that is allowed in variable names but not allowed as the first character (for example, a number), "@" is inserted as a prefix. For example "2nd" would become a variable named @2nd.
- Column labels that would result in duplicate variable names are resolved by appending an underscore and a sequential letter. For example, the second instance of "Count" would become a variable named Count_A.
- Underscores or periods at the end of labels are removed
from the resulting variable names. (The underscores at the end of
the automatically generated variables Command_,
Subtype_
, and Label_ are not removed.) - If more than one element is in the column dimension, variable names are constructed by combining category labels with underscores between category labels. Group labels are not included. For example, if VarB is nested under VarA in the columns, you would get variables like CatA1_CatB1, not VarA_CatA1_VarB_CatB1.
