14.03.2014 Views

Download Jmp User Guide

Download Jmp User Guide

Download Jmp User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter 9 Formula Editor 301<br />

Using Functions<br />

• Pat Match returns True (1) if the pattern is found in the string, or it returns False (0) if the pattern<br />

was not found in the string.<br />

• To use regular expressions instead of patterns, use Regex Match.<br />

To build a formula that contains a character pattern<br />

1 Open the formula editor by right-clicking a column name in the data grid and selecting Formula.<br />

2 Select an expression in the formula editing area by clicking it. (It is selected when there is a red<br />

outline around it.)<br />

3 Click the menu on the function browser and select Character Pattern, as shown in Figure 9.12.<br />

The character pattern functions now appear in the list below the menu.<br />

Figure 9.12 Select Character Pattern<br />

9Formulas<br />

4 Select which function to insert in the formula. For descriptions of each function, see “Character<br />

Pattern Functions,” p. 465.<br />

Comparing Values<br />

You can create a formula that compares the values of two arguments. You do this by using the<br />

comparison function. Each comparison relationship evaluates as true or false based on numeric<br />

magnitudes or character rankings. A true relationship evaluates as 1, and false evaluates as 0.<br />

Comparisons are useful when you include them in conditional expressions, but they can also stand<br />

alone as numeric expressions if neither term in comparison is missing.<br />

A relational symbol’s arguments can be any two expressions. However, both arguments in a comparison<br />

function must be of the same data type. Also note that:<br />

• JMP displays an error if you use a single “=” in a conditional where “==” is expected.<br />

• The formula editor uses the International Utilities package when comparing character strings. This<br />

package contains different rankings for each international character set and takes diacritical marks<br />

into consideration.<br />

• You should not use comparison operators to specifically compare to a missing value. Instead, use the<br />

Is Missing function to detect a missing value. (See “Comparing Values,” p. 301.)

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

Saved successfully!

Ooh no, something went wrong!