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]

Re: st: how to insheet flat file with quote literals losslessly


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: how to insheet flat file with quote literals losslessly
Date   Mon, 26 Mar 2012 08:37:12 +0100

I'd try changing the " to something else that does not occur in the
file before you read the data in. "@" is often a good candidate. See
-hexdump- and -filefilter-.

Also, -update- from 12 to 12.1.

Nick

On Mon, Mar 26, 2012 at 4:41 AM, James Sams <sams.james@gmail.com> wrote:
> I have a nearly 20 gigabyte dataset shipped as a set of tab-separated files.
> Several of the files have text fields where the fields contain a single and/or
> double quote literal (e.g. '24" ruler'). However I reprocess these fields
> (doubling the quotes "" or escaping the quotes \"), Stata either corrupts the
> input or reads the datum with the quote literal as blank. Is there a way to
> format the data so that it is read losslessly by stata?
>
> Stata 12 MP on Linux and OS X
*
*   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