Using Pattern Matching To Inspect Reports

This is the third step in building the oneway advisor.  In the first step the code for the main window was developed.  In the second step the code was revised to handle access to the icon files.

The advisor will validate the assumptions associated with a oneway analysis of variance.  It is assumed that the user has created the oneway analysis prior to running the advisor.  In this step this assumption is validated.

Detecting Reports

If a report window is open and contains a oneway analysis then it can have one of two possible appearances – as shown below:

oneway-window   oneway-window-alt

The reports differ by their title – the first was created using Fit Y by X, the second was created using the Oneway option on the JMP Starter window. The following code will detect the presence of one of these report windows.

If the report window is not found then an error message is displayed and execution is aborted.

Pattern Matching

The title of the window contains useful information – the name of the data table and the names of the columns used for the X and Y variables.  The following code retrieves these values by exploiting JMP’s pattern matching capabilities.

You should test the code with and without a oneway window open to verify that the code works as expected.

If you are not familiar with pattern matching you should note that the if the pattern matching is successful then the following variables are created: dtName, xColName and yColName.

You can add the following line at the end of the code to verify that these variables are successfully created:

show(dtName,xColName,yColName);

And Finally

The code step2.jsl needs to be revised to include this new logic.  Save the revisions as step3.jsl:

Continue to step 4.

2 thoughts on “Using Pattern Matching To Inspect Reports”

Leave a Reply

Your email address will not be published. Required fields are marked *