Statalist


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

Re: st: insheet fails with quotes in data


From   "Friedrich Huebler" <fhuebler@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: insheet fails with quotes in data
Date   Sat, 19 Apr 2008 12:44:27 -0400

My problem has been solved. Steve, Joseph and Scott, thank you for the
suggested solutions. Some of them worked, some did not because I
omitted a crucial detail in my initial post. The example files were
oversimplified. The actual files I have to import contain nine string
variables of varying length up to 150 characters and the variables can
contain blanks.

(1) Stat/Transfer:

Stat/Transfer can convert the files to Stata format, even without
changing "ASCII File Read Options/String Quote Character" to a blank.

(2) -infile-:

-infile- fails because it splits individual strings every time it
encounters a blank. -infile- can also not be used with a dictionary
because the variables in my data are not arranged in a fixed format.

(3) -file-:

-file- fails because each line from the tab-delimited text files is
imported as a single string. The maximum length of 244 characters is
too short to accommodate my data.

(4) -filefilter-:

This solution works. -filefilter- can replace the double quotes by a
character not present in the original data, for example curved quotes,
that can be changed back to the original straight quotes in Stata.

Many thanks,

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