Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: importing LONG string variables


From   "Friedrich Huebler" <fhuebler@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: importing LONG string variables
Date   Sat, 25 Aug 2007 11:09:27 -0400

Denisa,

Can you go back to the original data and create a properly delimited
text file as in the example below, with the same number of fields in
each row?

Name,Name,,Address,Address,,PatClass,PatClass,PatClass
Name,Name,Name,Address,Address,Address,PatClass,,

Friedrich

On 8/24/07, Mindruta, Denisa Constanta <mindruta@uiuc.edu> wrote:
> The delimiter between names and addresses is "tab" (well, it was "comma" in the previous message but it's easy to change it to "tab", which is less confusing) ; the delimiter among address (or names) themselves is "|". Because the number of addresses (and names) varies across rows, I will need a program to read across rows, count the number of "|" between two tabs and create as many new columns as the max number of "|" (+1) across rows. Then put everything between two "|" in one of the new columns. I guess I will have to do this in a different program/text editor, unless someone suggests a solution.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index