敬啟者:
我嘗試在同一個數據擬合器中使用“條件”和“按計數排序”。
它可以通過手動選擇工作,但在 JSL 中不起作用。
:age 不在數據過濾器中按計數排序。
有大佬可以幫忙嗎?謝謝。
謝謝。
按計數排序無法在此 JSL 中工作:
dt = open("$sample_data\big class.jmp");
dt << Data Filter(
Location( {912, 237} ),
Conditional,
Add Filter(
columns( :sex, :age ),
Where( :sex == "F" ),
Where( :age == 12 ),
Display( :age, N Items( 6 ) ),
Order By Count( :age ) //this should let :age order by count in the data filter, but don't
)
);按計數排序可以在此 JSL 中工作(“條件”更改為註釋塊):
dt = open("$sample_data\big class.jmp");
dt << Data Filter(
Location( {912, 237} ),
//Conditional, //hi, i change to comment block
Add Filter(
columns( :sex, :age ),
Where( :sex == "F" ),
Where( :age == 12 ),
Display( :age, N Items( 6 ) ),
Order By Count( :age ) //:age order by count can work when "conditional" change to comment block
)
);
我相信你已經發現了一個錯誤。這是我發現的,使用 JMP 16.1,Windows 10:
如果創建過濾器,但沒有選擇任何元素(Where () ),則 Order 元素創建一個有序列表
dt = open("$sample_data\big class.jmp");
dt << Data Filter(
Location( {912, 237} ),
Conditional,
Add Filter(
columns( :sex, :age ),
Display( :age, N Items( 6 ) ),
Order By Count( :age ) //this should let :age order by count in the data filter, but don't
)
);

並且,如果對 Sex 變量進行了選擇,則對 Conditional 結果進行排序

但是,如果取消選擇性別選項,則不再遵循排序

我建議您將其傳遞給 JMP 的支持人員
support@jmp.com