Statalist The Stata Listserver


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

st: Sort values in rows


From   "Nikolaos A. Patsopoulos" <[email protected]>
To   [email protected]
Subject   st: Sort values in rows
Date   Wed, 07 Feb 2007 16:15:16 +0200

Hi all,

I have a large dataset with 5 variables that contains number in random order:
v1 v2 v3 v4 v5
28 1 25 22 14
23 2 3 34 39
6 16 8 24 19
3 45 8 1 37
4 23 27 33 10
16 41 33 13 21
...................................
................................



I want to sort them in such a way that the v1[i]<v2[i]<v3[i]<v4[i]<v5[i] for each i:

1 14 22 25 28
2 3 23 34 39
......
......
..


Any ideas?

Thanks in advance,

Nikos



*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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