The Transpose node is very useful for restructuring data. One way it can be particularly helpful is with reporting of results, especially when the data has many more columns than rows.
This recipe uses the datafile cup98lrn_reduced_vars3.sav
and the stream Recipe – report with transpose.str
.
To reformat data with a Transpose node:
Open the stream
Recipe – report with transpose.str
by navigating to File | Open Stream.Make sure the datafile points to the correct path to
cup98lrn_reduced_vars3.sav
.Insert an Aggregate node and connect it to the Type node.
Open the Aggregate node and in the Key fields: area, select TARGET_B as the field to aggregate. In the Default Mode: options, deselect Sum so only Mean is checked. Click on the Apply default operations button at the right-end of the Default Mode: options. In the Aggregate fields region, select all of the continuous fields (except CONTROLN) and all of the flag fields...