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

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