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

st: RE: reordering observations

From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: reordering observations
Date   Fri, 1 Aug 2008 16:00:32 +0200

Well, - which reorder- tells me there is no such command in Stata, but surely there is an -order- command. Your request is unusual because a -sort- is supposed to affect all vars at the same time so that the observations gathered in the rows of the dataset remain intact. Why do you not just -keep- this one var, -save- it under a different name, -sort- it and then -merge- it back with the old data? I imagine that might also be possible with a -tempfile-...

Martin Weiss

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen

Fon: 0049-7071-2978184




-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Cindy Gao
Sent: Friday, August 01, 2008 3:44 PM
To: [email protected]
Subject: st: reordering observations


I need to reorder one of my variables (from lowest to highest) without changing the order of other variables in my dataset. Is there any simply way to do this?

Like, I have now:
var1    var2       var3 ...
3        7             9
2        10           3
7        8             5

And I like to reorder var3 to get:
var1    var2       var3 ...
3        7             3
2        10           5
7        8             9

Please, this is not the -reorder- command which is already there in Stata, it is something different.

Many thanks!

Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo!

*   For searches and help try:

*   For searches and help try:

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