Create Variables Using the Variable Editor
You create variables by doing the following:
Click the Edit user-defined variables toolbar button.
Selecting Tools > Variables
Alternatively, click the Variables tab, then press Insert.
You can also load user-defined variables.
View your user-defined variables in the Variables tab.
To sort the user-defined variables in the Data Editor, select Tools > Sort Variables.
To edit existing variables:
Rename directly by select-clicking in the Variables tab or press F2 (as in renaming in Windows® Explorer).
To edit in the Variable Editor, double-click a variable in the Variables tab.
Select Tools > Variables
Delete variables by selecting them in the Variables tab and pressing Delete
New Variables
You can define new variables in terms of existing variables:
Define the new variable by writing an equation in the edit box at the top of the Variable Editor dialog box.
You can type directly in the edit box or add variable names by double-clicking them. In the case of variable names especially, this latter method avoids typing mistakes. Variable names are case sensitive.
For example, to define for a new variable called
POWERthat is defined as the product of two existing variables,tqandn, enterPOWER = tq x n.Click OK to add the new variable to the current data set.
To edit a variable, click a variable in the left list, or click the button to add a new item to the list if you want to add a new variable.
Note
The computation of variable values is vectorized and occurs prior to filtering and clustering. The result must be either a vector the same length as the data set or a scalar, in which case the value is repeated for every record. Variables are used on a record-by-record basis.