Hello,
I have a string variable problem and I have looked high and low in the
manual for a solution. One variable in a data set is composed of both
the name of a country and the year of a survey, such as:
Albania2002
Albania2005
Serbia&Montenegro2002
Serbia&Montenegro2005
I want to drop the last four digits (there is already a variable called
year). I figured out how to drop the last four digits into another
variable with substr but cannot figure out what to do to keep the
country names (which vary in length) and drop the year. Any help much
appreciated (and I have spent an hour on this with the manual). You can
also respond to me directly since I get Statalist on digest. Many
thanks.
Ric Uslaner
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/