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: How do I split my string variable by capital letters?
From
Elena Vidal <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: How do I split my string variable by capital letters?
Date
Wed, 23 Nov 2011 23:22:30 +0000
Hi,
I'm having a bit of a problem splitting a string variable.
An example of the variable reads:
var12
"Startup/Seed
Early Stage
Expansion
Expansion
Expansion"
This corresponds to a single cell. That means: all 5 lines appear in 1 cell in my data, and I want to split it up so that each line is a different variable.
I've tried splitting it with this code:
split var12, gen(var12b)
but that didn't work.
I'd appreciate the help trying to sort this out!
Elena
*
* 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/