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 on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: reading in data where delimiter is replaced with return character


From   Stas Kolenikov <skolenik@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: reading in data where delimiter is replaced with return character
Date   Sun, 19 Aug 2012 19:32:20 -0500

Looks like

dictionary {
   _first(4)
   _lines(3)
   _line(1) str5 A
   _line(2) int B
   _line(3) int C
}

to me. Or something of the kind.

On Sat, Aug 18, 2012 at 2:58 PM, Airey, David C
<david.airey@vanderbilt.edu> wrote:
> .
>
> When copying tables from the web and pasting, files can lose delimiters (if they had any).
>
> So a file that looks like this online with var header included:
>
> A       B       C
> one     1       2
> three   3       4
>
> becomes this when pasted:
>
> A
> B
> C
> one
> 1
> 2
> three
> 3
> 4
>
> What Stata command handles this format?
>
> The infile command has a byvariable(#) option, but this is for data like:
>
> A one three
> B 1 3
> C 2 4
>
> -Dave
>
> *
> *   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/



-- 
-- Stas Kolenikov  ::  http://stas.kolenikov.name
-- Senior Survey Statistician, Abt SRBI  ::  work email kolenikovs at
srbi dot com
-- Opinions stated in this email are mine only, and do not reflect the
position of my employer
*
*   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