Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: how do you drop repeated values in a variable to remain with only one?
From
Gwinyai Masukume <[email protected]>
To
statalist <[email protected]>
Subject
st: how do you drop repeated values in a variable to remain with only one?
Date
Sun, 21 Apr 2013 08:51:41 +0200
Dear Stata list,
I have a dataset with variable A, which has repeated values:
A
1
2
2
2
3
3
4
5
5
6
6
6
Where the values are repeated e.g 2. I would like to drop the repeated
values and remain with only a single 2.
I have tried the duplicates drop command, but it does not work as the
repeated values are not duplicates, but say different hospital visits by
the same individual.
I would still like to drop repeated values of the variable A. How can I
do this?
Thanks for your consideration.
Kind regards,
Gwinyai
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/