Products | Versions |
---|---|
Spotfire Statistica | 13.1.13.2,13.3.0 |
2. Search "Rules" in "Feature Finder" box on top right and add it to the workspace.
3. Click "Edit Parameters" (the wheel icon) on top left of "Rules" node to open Rules edition dialog.
4. Click "Input Variables to Copy" to select variables you want to display in the final spreadsheet. In this example, select all.
5. Under "Input Variables to Copy", there are a few options selected by default. Make sure you understand each option and select them appropriately. Illustration of those options in the e-manual can be accessed by clicking "?" on top right. In this example, deselect "Treat Missing Data as Error" and "Output Error variable".
6. Click "Edit" button under Rules to open "Rules Builder" dialog. Note: To import rules you saved, lick "Linked".
7. Click "New Nodes..." to browse drill-down options and select "If()". When the "Edit If Condition" dialog is prompted, type: "Sleep" > 780.
8. Select the first child "New node..." under the "If" condition and select "Variable = Formula".
9. In the prompted "Edit Formula" dialog, specify the new variable name and its formula. In this example, enter "Sleep_Group" = "Sleep_High" and click "OK".Â
10. Similarly, select the second child "New Node..." under the same "If" condition and select "Variable = Formula" again for the second new variable. In this example, enter "FollowUp" = "No" and click "OK".Â
Note: The drill-down options for a [New Node...] contain other commands for different actions such as building a nested if condition, selecting an existing model for execution, import existing rules from a file or Enterprise and ect. Click "?" on top right to learn more about those command options in e-manual.
11. Click a new parent "New node..." and select "Else".
12. Under "Else", click the first child "New node..." and select "Variable = Formula" to enter "Sleep_Group"="Sleep_Low".Click "OK". After that, click the second child "New node..." and select "Variable = Formula" to enter "FollowUp" = "Yes"'. Click "OK'.
Note: After the rules are specified, you can click "Save" on the right panel to save the defined rules in Rules Builder file, text file or XML file, that can be inked/copied to other rules builder node.
13. Click "OK" in the Rules dialog after all rules are defined. Run the "Rules" node through the "Run to the Node" button (the green arrow icon) in the workspace to generate the new spreadsheet. In the resulted spreadsheet, you will notice that two new variables are created in the last two columns depending on the value of "Sleep".