cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

How to use JMP script to select rows based on multiple criteria

overview

The following example shows how to use the logical AND (&) and logical OR (|) operators with the Select Where message to select rows that meet multiple conditions.

procedure

In a JMP session, click the File menu and select New > Script (or JSL Script in JMP 18). Copy the script below and paste it into the script window. To run the example script, click the Edit menu and select Run Script.

/* サンプルのデータテーブルを開きます。 */ 
dt = Open( "$SAMPLE_DATA\Big Class.jmp" ); 

/* 年齢が13より大きく、かつ、身長(インチ)が65より小さい学生の行を選択します。 */ 
dt << Select Where( :age > 13 & :height < 65 );

Wait( 2 ); // この行はデモンストレーション目的です。
dt << Clear Select; // この行はデモンストレーション目的です。

/* 年齢が12または14の学生の行を選択します。 */ 
dt << Select Where( :age == 12 | :age == 14 );

Additional Documentation

For more information about the JMP scripting language, see the Scripting Guide available in the online help .

Note: This FAQ is based on the following JMP Note:
JMP Note 575404 - How to select rows based upon multiple conditions using a JMP script


This post originally written in Japanese and has been translated for your convenience. When you reply, it will also be translated back to Japanese.

Details

Recommended Articles

No recommendations found