In this recipe we learn how to change variable names by adding suffixes or prefixes using a Derive node. The data sources for this recipe were developed by computing the average value of several key fields after aggregating by the variable
STATE and then by
DOMAIN. The Aggregate node, as a default, appends the string
_Mean (when obtaining a mean) to each of the variables so that the variable names come from both.
This recipe uses the datafiles
cup98lrn_reduced_vars3_varchange state.sav and
up98lrn_reduced_vars3_varchange domain.sav, and the stream
Recipe – change variable names.str.
To change variable names by adding suffixes or prefixes using a Derive node: