[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: cut string variables
use the substr function, as in
gen str word2=substr(word1,1,50)
to get the first 50 characters of word1 into the new variable called word2
susanne neckermann wrote:
I cannot open a data set in my intercooled Stata version because one of
the variables is a string with 102 characters and intercooled Stata only
allows for 80.
I can open the data set at a friend's computer who has the full version
of stata. But we have not found out, what the command is to cut the
length of this particular string. so that we can change the data set and
I can work with it on my computer.
It would be o.k., if only the first 50 characters or so remain.
Can you help?
Thank you very much.
Greetings from Switzerland,
* For searches and help try: