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: Writing a loop to change a letter in a string variable
From
Martin Pszczola <[email protected]>
To
[email protected]
Subject
st: Writing a loop to change a letter in a string variable
Date
Wed, 11 Aug 2010 10:21:31 -0500
Hi;
I am trying to edit my data, which happens to include a lot of Spanish accents. For example, I have a variable named "apellido" with string data like "JimÉnez" and I want to find an efficient way to change that to "Jimenez". Can anyone suggest a loop that would make such a change over the whole variable? Also, how can one change from capital letters to lower case, i.e. "Jimenez" to "jimenez". 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/