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: Removing Repeated Phrases in String Variable
From
Becker Stein <[email protected]>
To
[email protected]
Subject
st: Removing Repeated Phrases in String Variable
Date
Sat, 14 Dec 2013 16:26:51 -0500 (EST)
Hi,
I was wondering if someone could help me remove repeated words/phrases
in a string variable. My data has a lot repeats and I only want to keep
the first instance of an item. Below is an example.
BMW North America; Honda; Toyota; Nissan; BMW North America; Mercedes
Benz North America; Nissan; Subaru; Nissan; Ford
In the above example, I'd like to get rid of the extra instances of BMW
North America and Nissan. Is there a way to do this? Thanks in advance
for your help.
Becker
*
* 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/