[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: how to keep only the first letter of a string type variable
I have a variable of string type and I only want to keep the first
letter in each observation. I tried to use "abbrev" function as below:
gen str11 newcountry = abbrev( country,1)
but it didn't work. Could you help me please? and thanks a lot David
for your reply about missing data!
* For searches and help try: