Bookmark and Share

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: detect unique values of onevariable into a new variable


From   Robert Budras <[email protected]>
To   [email protected]
Subject   st: detect unique values of onevariable into a new variable
Date   Mon, 20 Dec 2010 17:56:07 +0100

I would like to know if and how I can detect unique values of one
variable and write them into a new variable.

For Example:

Country

Australia
Australia
Belgium
Belgium
Germany

I need a variable which is:
unique = "Australia" "Belgium" "Germany"

I don't need:
unique = "Australia" "Australia" "Belgium" "Belgium" "Germany"

Thank you!
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index