敬启者:
我尝试在同一个数据拟合器中使用“条件”和“按计数排序”。
它可以通过手动选择工作,但在 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
尊敬的先生,非常感谢您。
我已将这个问题发送给support@jmp.com .
谢谢。