14.03.2014 Views

Download Jmp User Guide

Download Jmp User Guide

Download Jmp User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 9 Formula Editor 309<br />

Using Functions<br />

6 Use the table above to help select which function to insert in the formula. For descriptions of each<br />

function, see “Row State Functions,” p. 489.<br />

Using Assignment Functions<br />

Assignment functions work in place. That is, the result returned by the operation (on the right of the<br />

operator) is stored in the argument on the left of the operator and replaces its current value.<br />

Assignment statements are most often used in conjunction with other commands to build a JMP<br />

Scripting Language (JSL) script. You can use the formula editor to create and execute a script in that<br />

column, but this is not recommended because of dependencies and ambiguities that can result. Most<br />

often, scripts are stored as .jsl files, and can be saved with a data table. See “Creating Scripts,” p. 87, for<br />

details. See the JMP Scripting <strong>Guide</strong> for documentation of all scripting commands.<br />

9Formulas<br />

Note: The first argument of an assignment function must be capable of being assigned. This means<br />

you cannot have an assignment such as 3+=4, because 3 is a constant value that cannot be reassigned.<br />

You must first create a variable (a table variable or local variable) whose value is 3. (See “Adding Table<br />

Variables,” p. 84, for details about table variables. See “Referencing Columns and Table Variables,”<br />

p. 288, for details about local variables). Then use that variable as the left-hand argument of the<br />

assignment function.<br />

To build a formula that contains an assignment function<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 Assignment, as shown in Figure 9.21. The<br />

assignment functions now appear in the list below the menu.<br />

Figure 9.21 Select Assignment from the Function Browser List<br />

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

Functions,” p. 493.

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

Saved successfully!

Ooh no, something went wrong!