1. Home
  2. Changing Labels to Levels

Changing Labels to Levels

Note: You can also change levels to labels.

Numeric factor labels can be changed to levels. If factor labels can be read as numbers or dates the values will be copied into the levels and the labels will be removed.

If any labels are not in a numeric/date format, then where possible numbers are read from labels by taking all digits that appear before the first non-numeric character. If the label does not start with a digit then the corresponding ordinal value is used for the level. For example, if a factor had the labels ’12A1′ and ‘B12′ then the first label (’12A1’) would be changed to 12 and the second label (‘B12’) would be changed to 2 (the corresponding ordinal value).

  1. Put the cursor into a column, or select multiple columns by holding down Ctrl and clicking the column headers.

     

  2. From the menu select Spread | Factor | Change Labels to Levels.

Values will become right aligned within the column to indicate that these are now numbers, rather than text (which is left aligned by default).

Updated on December 14, 2018

Was this article helpful?