你好,
我在以下方面遇到了一些麻煩。 我有一組自定義輸出,按變量分組,我需要在一個報告中。 我得到了我需要的輸出。 但是,由於 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 )
);