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: AW: Writing a loop to change a letter in a string variable
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: AW: Writing a loop to change a letter in a string variable
Date
Wed, 11 Aug 2010 17:21:56 +0200
<>
No loop required at all, try -lower()- and -subinstr()- functions, as
described in -help string_functions-.
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Martin Pszczola
Gesendet: Mittwoch, 11. August 2010 17:22
An: [email protected]
Betreff: st: Writing a loop to change a letter in a string variable
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/
*
* 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/