If you want to rank in decreasing order, you can either:
1 - scan with a minus sign
table T = with[| as N |][| 0 |][| 1 |][| 2 |][| 3 |] T.rk = rank() scan -T.N show table "" a1b4 withT.NT.rk1 2 3 4 5 6 7 8 9 10 11 12
2 - Use rankrev function (not documented but similar to rank function)
table T = with[| as N |][| 0 |][| 1 |][| 2 |][| 3 |] // equivalent to rank() scan -T.NT.rk = rankrev() scan T.N show table "" a1b4 withT.NT.rk1 2 3 4 5 6 7 8 9 10 11 12 13
If you want to rank in decreasing order, you can either:
1 - scan with a minus sign
2 - Use rankrev function (not documented but similar to rank function)