這步功能看起來很有用:)

我注意到的一些事情:
1) 不要使用字符串值作為 yi - 儘管它似乎是“允許的”:

2) 說明 - 附加組件:
返回與滿足 xi 小於或等於 x 參數的最大 xi 對應的 yi 參數
- 但只有:如果還有另一個 xi 大於 x 。
3) yi 值不能為空。
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "binning1",Character, "Nominal", Formula( Step( :weight, 0, "low", 90, "mid", 140, "high", 1000, "max" ) ));
dt << New Column( "binning2",Numeric,"Nominal", Format( "Best", 9 ),Formula( Step( :weight, 0, 0, 90, 1, 140, 2 ) ));
dt << New Column( "binning3",Numeric, "Nominal", Format( "Best", 9 ),Formula( Step( :weight, 0, 0, 90, 1, 140, 2, 1000, . ) ));
dt << New Column( "binning_final", Numeric, "Nominal", Format( "Best", 9 ), Formula( Step( :weight, 0, 0, 90, 1, 140, 2, 1000, -1 ) ));