我在嘗試編寫將 Tabulate 物件製作成新資料表的腳本時遇到問題。我已經嘗試了下面的兩種語法,但都沒有建立表。我將其用作更大工作流程中的一個步驟。
t2 = tbl << Tabulate(
Add Table(
Column Table( Grouping Columns( :Treatment ) ),
Row Table(
Analysis Columns(
:"Attribute 1"n,
:"Attribute 2"n,
:"Attribute 3"n,
:"Attribute 4"n,
:"Attribute 5"n, :"Attribute 6"n,
:"Attribute 7"n, :"Attribute 8"n,
:"Attribute 9"n,
:"Attribute 10"n, :"Attribute 11"n
),
Statistics( Mean )
)
),
Local Data Filter(
Mode( Show( 0 ) ),
Add Filter( columns( :A or B), Where( :A or B == "A" ) )
),
)) << Make Into Data Table();
和
t2 = tbl << Tabulate(
Add Table(
Column Table( Grouping Columns( :Treatment ) ),
Row Table(
Analysis Columns(
:"Attribute 1"n,
:"Attribute 2"n,
:"Attribute 3"n,
:"Attribute 4"n,
:"Attribute 5"n, :"Attribute 6"n,
:"Attribute 7"n, :"Attribute 8"n,
:"Attribute 9"n,
:"Attribute 10"n, :"Attribute 11"n
),
Statistics( Mean )
)
),
Local Data Filter(
Mode( Show( 0 ) ),
Add Filter( columns( :A or B), Where( :A or B == "A" ) )
),
));
Wait(1);
t2 << Make Into Data Table();
我使用的是 JMP 17.2。
嗯,有趣。
在第一個範例中,當您添加一些括號時它應該可以工作。如果沒有括號,您將訊息傳送到表格而不是 Tabulate 物件。
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
(dt << Tabulate(
Add Table(
Column Table( Analysis Columns( :height ) ),
Row Table( Grouping Columns( :sex ) )
)
)) << Make Into Data Table();
第二個選項應該有效。也許有一個錯字?
最簡單的方法:
使用 GUI,然後轉到日誌並“竊取程式碼”。
添加括號修復了它 - 所有這些問題都只是由於拼寫錯誤造成的。謝謝你!