Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Godd morning,
i'm trying to create a classification. I would like to have those classes:
10<=x<15
5<=x<10
3<=x<5
1<=x<3
0<=x<1
with the class function i'm able to create a class with always a predefinited range:
class( var,10 ) with var = 23 returns '20<=x<30'
How can i have those classes?
Thanks
Try something like this:
Class:
load
Start,
num(Stop - 0.000001, '0') as Stop,
Start & '<=X<' & Stop as Class
inline [
Start, Stop
0,1
1,3
3,5
5,10
10,15
];
Data:
LOAD
recno()-1 as X
AutoGenerate 17;
LEFT JOIN (Data)
IntervalMatch(X)
LOAD Start, Stop Resident Class;
LEFT JOIN (Data)
LOAD Start, Stop, Class Resident Class;
DROP TABLE Class;
As far as I know, you can't do that classification using Class(). You could however use IntervalMatch() to solve your problem.
Try something like this:
Class:
load
Start,
num(Stop - 0.000001, '0') as Stop,
Start & '<=X<' & Stop as Class
inline [
Start, Stop
0,1
1,3
3,5
5,10
10,15
];
Data:
LOAD
recno()-1 as X
AutoGenerate 17;
LEFT JOIN (Data)
IntervalMatch(X)
LOAD Start, Stop Resident Class;
LEFT JOIN (Data)
LOAD Start, Stop, Class Resident Class;
DROP TABLE Class;