Building transformations with multiple Derive nodes
In this recipe we will create several new variables with a single Derive node by invoking the multiple radio button.
Getting ready
This recipe uses the datafile cup98lrn_reduced_vars3.sav
and the stream Recipe - variable construct multiple derive.str
.
How to do it...
- Open the stream
Recipe - variable construct multiple derive.str
by clicking on File | Open Stream. - Make sure the datafile points to the correct path to the datafile
cup98lrn_reduced_vars3.sav
. - Add a Derive node to the stream and connect it to the Type node called
First Type
. - Open the Derive node, click on the Multiple radio button. In the Derive from region, select all of the RFA variables, from RFA_2 to RFA_24. You can select multiple variables by clicking on RFA_2, scrolling down to RFA_24 and Shift-clicking on RFA_24. Then click on OK.
- In the Field name extension box, change the text _Derive to
R
. - In the Field Type drop-down list, select Nominal. This is shown in the following screenshot...