Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: is ordering with -bysort- unique?


From   Radu Ban <[email protected]>
To   [email protected]
Subject   st: is ordering with -bysort- unique?
Date   Tue, 10 Jun 2003 16:29:35 -0400

dear all,

i'm cleaning a dataset and i encounter repeated ids. i want to keep them unique, but the problem is that for some repeated ids the variables differ. i want to keep just one of the repeated ids. so i'm using:

bysort id: keep if _n == 1

now i would like to know if this will keep the same id whenever the program is run. or does the ordering change?

sorry for such a basic question but right now i don't have access to the manuals.

thanks so much,

radu ban



*
* 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