For the latest version of JMP Help, visit JMP.com/help.


Using JMP > Enter and Edit Data > Restructure Data > Convert Labels to Codes and Codes to Labels
Publication date: 04/30/2021

Convert Labels to Codes and Codes to Labels

Suppose that you have a column of strings such as “dissatisfied”, “somewhat dissatisfied”, and “somewhat satisfied”, and “satisfied”. You can recode the values to “1”, “2”, “3”, and “4”. The original strings are placed in the Value Labels column property for that column. If the column has a List Check property, the property is removed. The column data type is changed to 1-byte Integer. Converting a column of strings to short numeric codes saves memory and can speed up processing.

You can also convert a numeric column of codes to labels. The column must have value labels. The column data type is changed to Character, and the Value Label column property is removed. This is, in effect, the opposite of converting labels to codes.

Convert Labels to Codes

1. Select the character column and select Cols > Utilities > Labels to Codes.

Figure 4.38 Converting Labels to Codes 

Default codes are assigned to the values.

2. Change the codes if desired and click OK.

The column is recoded, and value labels are added to the column.

Convert Codes to Labels

1. Select the numeric column that contains value labels and select Cols > Utilities > Codes to Labels.

2. Change the labels if desired and click OK.

The column is recoded with the original value labels.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).