안녕하세요 여러분,
여러 테이블을 요약하려고 하는데 루프 형식이어야 합니다.
1. 출력 테이블 이름을 균일한 이름으로 루프하는 방법(예: 요약 1, 요약 2)
2. 다른 요약을 위해 다음 출력 테이블을 다시 반복하려면 어떻게 해야 합니까?
도와주세요. 티아
- 요약 1, 요약 2... 등의 이름이 필요한 특정 이름이 있습니까?
- 특정 이름이 있는 경우 해당 이름을 사용할 수 있지만 이에 대해 조언하고 참조를 사용합니다.
다음은 참조를 사용하는 방법에 대한 Big Class의 예입니다.
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")
);