[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: levelsof for many categories without sorting
I find the command "levelsof" very useful to cut down the time on loops when I run through the category of a variable (e.g. the location_ids of a large survey).
What I also like is that the local macro generated by levlesof is - so it seams to me - still in the order in which it appears in the data and does not sort it which is needed at times (even though the hlp file of levelsof says otherwise). When usually a list is entered into a local it is then sorted.
The problem of course is that there are constraints on levelsof when it hits the character limit.
My question is:
What can I use instead of levelsof for (i) a large number of categories to avoid the character constraint but which (ii) also keeps the categories in the order it appears in the data and does not sort it.
(i) is much more important than (ii) but if someone did an elegant solution for (ii) I would love to hear of it.
Any suggestions would be most welcome.
Dr. Iwan Barankay
Department of Economics
University of Essex
* For searches and help try: