ranvar.buckets

ranvar.buckets(weight : number, lowerIncl : number, higherIncl : number) 🡒 ranvar, aggregator

Returns a ranvar as specified segment-wise.

Example:

table T = with
  [| as P, as A, as B, as X |]
  [| 0.4, 0,  1, "a" |]
  [| 0.6, 2,  3, "a" |]
  [| 0.5, 1,  3, "b" |]
  [| 0.5, 5, 10, "b" |]
  [| 1.0, 0, 10, "c" |]

table G[gdim] = by T.X

where T.X != "c"
  show table "" a1b4 with
    gdim
    ranvar.buckets(T.P, T.A, T.B)
    group by gdim

If any of those conditions are not respected, the aggregation fails: