嗨,我想知道在使用製表時是否有辦法在分組列的每一行中顯示一個值。 例如,在下表生成的表格中,為國家/地區的每一行顯示一個值。
NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Car Poll.jmp");
obj = dt << Tabulate(
Add Table(
Column Table(Grouping Columns(:sex, :marital status)),
Row Table(Grouping Columns(:country, :size))
)
);
如果您在製表的紅色小三角菜單下“製作成數據表”,則生成的數據表的每一行都會有一個國家。 也許這有幫助?
如果將 Tabulate 表製作成數據表,則可以創建一個新窗口並使用 Table Box() 創建所需的輸出
製表中的數據表

使用 Table Box() 生成窗口的腳本
Names Default To Here( 1 );
dt = Current Data Table();
New Window( "table",
tb = Table Box(
String Col Box( "Country", dt:country << get values ),
String Col Box( "size", dt:size << get values ),
Col Span Box(
"Sex",
Col Span Box(
"Female\!nMarital Status",
Number Col Box( "Married", dt:Female Marital Status married << get values ),
Number Col Box( "Single", dt:Female Marital Status single << get values )
),
Col Span Box(
"Male\!nMarital Status",
Number Col Box( "Married", dt:male Marital Status married << get values ),
Number Col Box( "Single", dt:male Marital Status single << get values )
)
)
)
);
輸出的樣子
