你好,
我在以下方面遇到了一些麻烦。 我有一组自定义输出,按变量分组,我需要在一个报告中。 我得到了我需要的输出。 但是,由于 for 循环,我得到了如此多的子集数据表。 我正在阅读有关选项卡窗口的内容,但网上关于将多个数据表放入选项卡的文章并不多。 有这样的选择吗?
如果没有,那么也许我可以在我的 JMP 脚本中添加一个选项,自动最小化报告生成的数据表。
如果没有上面提到的这样的选项,是否有一种方法可以只使用 select where 语句来选择数据的行,然后使用这些行将自定义和自动输出生成到单个报告中? 我试着用本论坛的方法论,但我没有得到任何结果。
这是我当前的 JMP 脚本,以及附加的 jmp 文件。
Names Default To Here( 1 );
dt = Current Data Table();
col9 = Column(dt, "category");
unique_category = Associative Array(col9) << get keys;
nw= New Window("results",
container = V List Box()
);
for (i = 1, i <= N Items(unique_category), i++,
content = V List Box(
vali = unique_category[i];
dt << Select Where(:category == vali);
//subset the selected data
listDT = dt << Subset(
output table name( "Subset where category is " || vali ),
Selected rows only ( 1 ),
Selected columns only( 1 )
);
//Get the measurment units formatted, if applicable
col4 = Column( listDT, "Measurement Units");
units = col4[1];
units_formatted = If(Is Missing(units), "", Is String(units), " (" || units || ") ");
//chart
Oneway(SendToByGroup( {:category == vali},
Y( :results ) ),
SendToByGroup(
{:category == vali},
X( :name),
Connect Means( 1 ),
Grand Mean( 0 )
),
SendToByGroup(
{:category == vali},
SendToReport(
Dispatch(
{},
"2",
ScaleBox,
{Label Row( Set Font Size( 5 ) )}
),
Dispatch(
{},
"results",
TextEditBox,
{Set Text( vali || units_formatted )}
),
Dispatch(
{},
"Oneway Plot",
FrameBox,
{Frame Size( 1500, 300 ), DispatchSeg(
CustomStreamSeg( 6 ),
{Line Color( "Gray" )}
), Row Legend(
subcategory,
Color( 1 ),
Color Theme( "" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)
);
);
container << Append(content)
);如果您只是让子集数据表不可见,则可以多次清理输出。
listDT = dt << Subset( invisible,
output table name( "Subset where category is " || vali ),
Selected rows only ( 1 ),
Selected columns only( 1 )
);