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]
Re: st: break string into multiple variables
From
Steve Nakoneshny <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: break string into multiple variables
Date
Wed, 10 Oct 2012 18:53:13 -0600
Sophie,
At first glance, I would suggest looking at -split-, but only prior to using -destring-. There might be an option for splitting each character into a new var.
Steve
Sent via carrier pigeon
On 2012-10-10, at 5:33 PM, "Sophie Moullin" <[email protected]> wrote:
> Dear all,
>
> I've got a number of string variables which contain answers for up to
> 13 questions within the broad variable category, which when destrung
> are listed as one single numeric, e.g. 2222112222 (1 is yes, 2 is no).
> I need to create separate variables for each question 1-13.
>
> I haven't been able to find any example code for this on any of the
> stata documentation or FAQ. Any advice would be much appreciated.
>
> Many thanks,
> Sophie
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/