[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: sorting rows with a "key"

From   "Ashim Kapoor" <>
Subject   st: sorting rows with a "key"
Date   Wed, 10 Sep 2008 11:31:42 +0530

Hello everyone,

I have a small question. I really liked the program "sortrows" . I
wish to ask if anyone has written a similar program for sorting with a

I mean the following.:=

say I have 4 variables ( in my case I have around a 100 so I cannot
possibly do it in the usual manual bubble sort because it takes

say a1 a2 key1 key2

I want to say sortrows ( key1 key2)  which will do the usual sortrows
BUT it will also sort the a1 and a2 in the same order ie. if k1 < k2
then a1 < a2 for that row.

Any tips ? Any program which already does this ?

Thank you,
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index