Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[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 <maria.vidal@duke.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index