range2f(X;L;D)

Returns the textual representation of which of the intervals, defined by a specified list of numbers, that a given value falls.

Syntax

range2f(X;L;D)

Input

Argument Type Description
X any numeric type A scalar value or the name of a column
L any numeric type

A comma- or space-separated list of numbers

D integer The number of decimal places to show for the values of the resultant interval

Return Value

Returns a text value corresponding to the interval in which X falls. The intervals are defined by the list L, and the resultant interval is displayed with the precision specified by D. D can be used to help ensure that items line up properly for sorting.

If X is N/A, the result is 'N/A'.

Sample Usage

value list decimals range2f(value;list;decimals)
-5 0,10,25,50,100 2 '<= 0.00'
10 0,10,25,50,100 2 '0.01- 10.00'
30 0,10,25,50,100 2 '25.01- 50.00'
200 0,10,25,50,100 2 '> 100.00'
10.5 0,10.25,25.25,50,100.75 2 '10.26- 25.00'
0,10,25,50,100 2 'N/A'