Sort Label/Level Order within a Factor Column
See Also
This dialog allows the order that the labels/levels are displayed within a factor in spreadsheet or tables of results to be sorted based on one of the specified criteria. This can be used to reorder a factor quickly based on structured information in the labels. The factor levels can always be manually sorted using the Reorder Factor Levels dialog.

The User sort order can be specified on the Spreadsheet Conversions Options Tab dialog using the User defined Label order button which opens the User defined Label/Level Order within a Factor dialog.

Sort Type

User OrderUse the ordering specified in the user sort order entered with the User defined Label/Level Order within a Factor dialog.
Compass PointsUse the order of compass points (N, NE, E, etc.) for the labels.
Week daysUse the order of Weekdays (Mon, Tue, Wed, etc.) for the labels.
Month names (abbreviated)Use the order of 3 letter month names (Jan, Feb, Mar, etc.) for the labels.
Month names (full)Use the order of full month names (January, February, March, etc.) for the labels.
Compass PointsUse order of compass points (N, NE, E, etc.) on the labels.
AlphabeticalUse alphabetical sort order on the labels.
By Numerical partRead any number within the label and sort numerically on these. For example the list A2, B1, 0X, Z1.2 will sort to 0X, B1, Z1.2, A2.
Numerical suffixSort numerically on whole numbers at the start of the label, and then alphabetically on the remainder of the label. For example the alphabetically sorted list 100A, 10A, 10B, 1A, 1B, 20B, 2A, will sort to 1A, 1B, 10A, 10B, 100A, 2A, 20B.
Numerical prefixSort alphabetically on the letters at the start of the label and then numerically on whole numbers at the end of the label. For example the list A1, A10, A100, A2, A20 will sort to A1, A2, A10, A20, A100.
By LevelsSort numerically using the factor levels.
By FrequencySort according to the frequency of occurrence of each factor group in the column.

Starting Position

For predefined lists (day, months, compass points or user specified) this gives the starting position in the list. The list is treated as circular, so for example with months, the first month by default is January, but by specifying a starting position of June, the months will be sorted in the order June, July, ... May.

Sort Direction

Selects whether the data is sorted into ascending or descending order.

OK

Use the specified criterion to sort the columns into a new order and close the dialog.

Cancel

Close the dialog without making any changes to the label order.

See Also

The FACSORT procedure can be used within the command language to provide this functionality.