14.03.2014 Views

Using JMP - SAS

Using JMP - SAS

Using JMP - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

414 Formula Functions Reference Appendix B<br />

Conditional Functions<br />

Figure B.5 An Example of <strong>Using</strong> the Match Function<br />

Note: Match ignores trailing spaces and If does not.<br />

Although Match returns missing for any missing values, you can also specifically match missing values.<br />

Choose<br />

Choose is a special case of Match in which the arguments of the condition are a sequence of integers<br />

starting at one. The value of clause replaces the match condition. An example of a Choose condition is<br />

shown in Figure B.6. With Choose, the Formula Editor goes directly to the correct choice clause and<br />

evaluates the result expression.<br />

Figure B.6 Example of a Choose Condition<br />

When you highlight an expression and click Choose, the Formula Editor creates a new conditional<br />

expression with one clause. Use the insert ( ) and delete ( ) buttons on the keypad to add new clauses<br />

or remove unwanted clauses, as described previously for the If conditional.<br />

Choose evaluates the choose expression and goes immediately to the corresponding result expression to<br />

generate the returned value. With Choose, you provide a choosing expression that yields sequential integers<br />

starting at 1 only once, and then you give a choice for each integer in the sequence.<br />

IfMax<br />

Evaluates the first of each pair of arguments and returns the evaluation of the result expression (the second<br />

of each pair) associated with the maximum of the expressions. If more than one expression is the maximum,<br />

the first maximum is returned. If all expressions are missing and a final result is not specified, missing is<br />

returned. If all expressions are missing and a final result is specified, that final result is returned. The test<br />

expressions must evaluate to numeric values, but the result expressions can be anything.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!