こんにちは、みんな、
複数のテーブルを要約しようとしていますが、ループ形式にする必要があります。
1.出力テーブル名をループして統一名にする方法(例:要約1、要約2)
2.別の要約のために次の出力テーブルを再度ループするにはどうすればよいですか?
助けてください。 TIA
- 要約1、要約2 ...などの名前が必要な特定の名前はありますか?
- 特定の名前がある場合はそれらを使用できますが、それに対してアドバイスし、参照を使用します。
これは、参照の使用方法をビッグクラスで使用した例です。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt_list = dt << Subset(
By(:sex),
All rows,
Selected columns only(0),
columns(:name, :age, :height, :weight)
);
show(dt_list);
//add dt to dt_list
Insert into(dt_list, dt);
show(dt_list);
//create list to collect summary tables
dt_summary_list = {};
//will require JMP16 due to For Each. For Each can be replöaced with for loop
For Each({val, idx}, dt_list,
dt_summary = val << Summary(
output table("Summary " || char(idx)), //we can use output table() to define name
//output table("Summary"), //you could also let jmp take care of naming
Group(:age),
Mean(:height),
Freq("None"),
Weight("None")
);
Insert Into(dt_summary_list, dt_summary);
);
Show(dt_summary_list[2]); //should use list and indices rather than "hardcoded" names
summary_of_summary = Datatable("Summary 2") << Summary(
output table("SummaryOfSummary2"),
Mean(:"Mean(height)"n),
Freq("None"),
Weight("None")
);