Changing large numbers of variable names without scripting

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.

Getting ready

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.

How to do it...

To change variable names by adding suffixes or prefixes using a Derive node:

Get IBM SPSS Modeler Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.