Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[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 <martinpsz@gmail.com>
To   statalist@hsphsun2.harvard.edu
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index