The step function looks useful
![hogi_1-1693555860881.png hogi_1-1693555860881.png](https://community.jmp.com/t5/image/serverpage/image-id/56146iD048781F581B64AD/image-size/medium?v=v2&px=400)
some things which I noticed:
1) Don't use string values as yi - although it seems to be "allowed":
![hogi_0-1693555667660.png hogi_0-1693555667660.png](https://community.jmp.com/t5/image/serverpage/image-id/56145iE9BD23F3CFF4E49C/image-size/medium?v=v2&px=400)
2) Description - add-on:
Returns the yi argument corresponding to the largest xi which satisfies xi less than or equal to the x argument
- but only: IF there is another xi that is larger than x.
3) None of the yi values must be empty.
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 ) ));