Bookmark and Share

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: correction


From   Sophie Moullin <[email protected]>
To   [email protected]
Subject   Re: st: break string into multiple variables: correction
Date   Thu, 11 Oct 2012 10:38:34 -0400

Thanks everyone - this was very helpful.

-substr- worked for me, and as there were no zeros given as missing
values, that didn't prove a problem.

I wish to close this thread now.

Many Thanks
Sophie


On 11 October 2012 09:59, Steve Samuels <[email protected]> wrote:
>
> Sophie privately thanked responders to her question.  I want to correct an error in my post. Only -infile-
> allows one to specify variable labels in the dictionary file.
>
> Steve
>
>
>> Another approach is to -outfile- the string variables to a text file,
>> then -infix- or -infile- the individual questions with a dictionary
>> file. This would allow you to name and label the questions at the same
>> time.
>>
>> Steve
>>
>>
>>> On Oct 10, 2012, at 7:32 PM, Sophie Moullin 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.
>>>
>
> *
> *   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index