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: how to insheet flat file with quote literals losslessly


From   Nick Cox <[email protected]>
To   [email protected]
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 <[email protected]> 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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index