Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

class function explination?

class( var,10,'x',5 ) with var = 23 returns '15<=x<25'



i understand how it works  my doubts  is   '5'   what it do here?

2 Replies
Anonymous
Not applicable
Author

5 is actually a offset. If you don't put anything, the bucket will start from 0. In above case the bucket will start from 5. So you will get '5<=x<15', '15<=x<25', '25<=x<35' value in class field.

its_anandrjs

From Help about the Class function check this

class(expression, interval [ , label [ , offset ]])

Creates a classification of expressions. The bin width is determined by the number set as interval. The result is shown as a<=x<b, where a and b are the upper and lower limits of the bin. The x can be replaced by an arbitrary string stated in label. 0 is normally the default starting point of the classification. This can be changed by adding an offset.

Examples:

class( var,10 ) with var = 23 returns '20<=x<30'

class( var,5,'value' ) with var = 23 returns '20<= value <25'

class( var,10,'x',5 ) with var = 23 returns '15<=x<25'