Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | daniel klein <klein.daniel.81@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: how do you drop repeated values in a variable to remain with only one? |
Date | Sun, 21 Apr 2013 10:37:00 +0200 |
Gwinyai, I do not fully understand your problem due to the fact that, despite otherwise adivesed in the FAQ, you do not show what exactly you typed (in fact, you do not show us any syntax). Anyway, -duplicates drop- works very fine for me clear inp A 1 2 2 2 3 3 4 5 5 6 6 6 end l duplicates drop A ,force l Could you reformulate your problem, showing us what exactly you typed, what Stata did in response and why it is not what you would expect? Best Daniel -- Dear Stata list, I have a dataset with variable A, which has repeated values: [...] 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. * * 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/