
Convert numeric strings to numbers: This option can only be used when your input variable is a string, and will be grayed out otherwise.Output variables are strings: The new variable will be a string variable.Once you have specified all the transformations that you wish to make for the selected variable, click the “Continue” button.Ĥ Output variables are strings and Convert numeric strings to numbers: These options change the variable type of the new variable. You will need to repeat these steps for each value that you wish to recode. If you need to change one of the recodes that you have added to the Old->New area section, simply click on the one you wish to change and make changes in (1) and (2) as necessary. The recode that you have specified now appears in the text field.
Pspp syntax editor code#
If using this setting, it should be applied last.Ģ New Value: Specify the new value for your variable (i.e., a specific numeric code such as “2,” system-missing, or copy old values).ģ Old -> New: Once you have selected the old and new values for your selected variable in (1) and (2), click Add in area (3), Old->New.
Pspp syntax editor how to#
Once you click Old and New Values, a new window where you will specify how to transform the values will appear.ġ Old Value: Specify the type of value you wish to recode (e.g., a specific value, missing data, or a range of values) and the specific value to be recoded (e.g., a value of “1” or a range of “1-5”). (We discuss the If option in more detail later in this tutorial.) Once you are finished, click Change. Now the center text box, (B), will display both the name of the original variable as well as the name for the new variable (e.g., “Height -> Height_categ”).Ĭ Old and New Variables: Click the Old and New Values to specify how you wish to recode the values for the selected variable.ĭ If: The If option allows you to specify the conditions under which your recode will be applied. You will define the new name in (C).ī Output Variable: Define the name and label for your recoded variable(s) by typing them in the text fields. Click the arrow in the center to move the selected variable to the center text box, (B).Ī Input Variable -> Output Variable: The center text box lists the variable(s) you have selected to recode, as well as the name your new variable(s) will have after the recode. Select the variable you wish to recode by clicking it. The left column lists all of the variables in your dataset.

The Recode into Different Variables window will appear. To recode into different variables, click Transform > Recode into Different Variables.

That is, the changes do not overwrite the original variable they are instead applied to a copy of the original variable under a new name. Recoding into a different variable transforms an original variable into a new variable.
