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: Re: importing quirky csv


From   Gordon Hughes <G.A.Hughes@ed.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: importing quirky csv
Date   Fri, 25 Nov 2011 08:39:37 +0000

The suggestions posted in response to my query on "Conditional infile statements" should help.

The best option is probably to read each line into a long string variable and then use -split ..., gen(var) parse(,) destring...-. But, nothing will save you from a great deal of pain if the text strings contain embedded commas.

Gordon Hughes
g.a.hughes@ed.ac.uk

*
*   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