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: Re: Controlling record length in ASCII file imports


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: Re: Controlling record length in ASCII file imports
Date   Tue, 10 Aug 2010 10:44:33 -0400

Look for the lrecl() feature in dictionaries.
See -help infile2-.
HTH
--David

At 09:44 AM 8/10/2010, you wrote:
I am trying to import raw data from an ASCII file into Stata and am
failing. There should be about 800 observations, but I am importing
only 200 or so. I tried this using infix and writing a dictionary
file. I realized afterwards that the ASCII file is formatted poorly:
the data are not in nice, neat columns and each observation does not
start on a new line (i.e., observation 1 is on line one and
observation 2 begins at the end of observation 1 and perhaps wraps
around to line 2). I'm not quite sure of the most efficient way to
approach this, especially given that I have about 10 of these files
with about 800 observations each. It seems like I could manually put
each observation on a new line, but that would take a while. Is there
a way to specifiy record length? Or another option?

Thanks much,
Nathan
*
*   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/

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