overview
You may want to use JSL to specify multiple column names in a list in the launch windows of various JMP analysis platforms.
For example, suppose you want to write JSL to run an analysis on all columns in the JMP sample data "Pollen.jmp" using Analyze > Distribution and output a report.
The bottom line is that in cases like this, you should use the Eval List() function.
procedure
Below is an example of a script that will generate an error when run and will not output a report.
//このスクリプトは説明のために用意した失敗の例です。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Pollen.jmp" );
//サンプルデータ"Pollen.jmp"を開く。
columnlist = dt << Get Column Names( String );
//開いた"Pollen.jmp"の列名を文字列で取得し、リストに入れる。
dt << Distribution( Column( columnlist ) );
//リストに入れた列名の列に対して「一変量の分布」で分析したいが...
When you run this script, the sample data "Pollen.jmp" opens, but no report is output. If you select [View] > [Log] from the JMP menu and check the log, you can see the following output.
Distribution , Bad Argument( {columnlist} ), Distribution( /*###*/Column( columnlist ) )へのアクセスまたはその評価中のメッセージ:見つかりません。
In such cases, you need to use the Eval List() function. The Eval List() function allows you to evaluate the items in a list. In this example, we will use [Analyze] > [Univariate Distribution] to analyze all columns in "Pollen.jmp" and output a report. We will write a script using the Eval List() function as follows:
//このスクリプトは正しい例です。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Pollen.jmp" );
//サンプルデータ"Pollen.jmp"を開く。
columnlist = dt << Get Column Names( String );
//開いた"Pollen.jmp"の列名を文字列で取得し、リストに入れる。
dt << Distribution( Column( Eval List( columnlist ) ) );
//リストに入れた列名の列に対して「一変量の分布」で分析を行う。