Statalist


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

Re: st: insheet fails with quotes in data


From   "Scott Merryman" <[email protected]>
To   [email protected]
Subject   Re: st: insheet fails with quotes in data
Date   Sat, 19 Apr 2008 05:15:19 -0500

On Fri, Apr 18, 2008 at 9:54 PM, Friedrich Huebler <[email protected]> wrote:
<snip>
> How can the data be imported into Stata with all observations and
> preferably also with quotes, either single or in pairs? I can open the
> files in a text editor and look for quotes that do not appear in pairs
> to remove them manually, but this is inefficient and changes the
> original data.


You could use -infile-

. infile str6 v1 str6 v2 str6 v3 using test3.txt, clear
(3 observations read)

. l

     +------------------------+
     |    v1       v2      v3 |
     |------------------------|
  1. | row11    row12   row13 |
  2. | row21   row"22   row23 |
  3. | row31    row32   row33 |
     +------------------------+

Scott
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index