Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: read text file with multiple spaces


From   Raphael Fraser <[email protected]>
To   [email protected]
Subject   Re: st: read text file with multiple spaces
Date   Thu, 18 Aug 2005 23:03:29 -0400

Yu,

I can think of no other way but what you stated already using the
infile command. However, if your data are all numeric then

infile using myfile

should also work.

Regards,
Raphael

On 8/18/05, Yu Zhang <[email protected]> wrote:
> It's a shame to ask, but does anyone know how to read
> data (text file) with multiple spaces between
> variables?  The number of spaces may vary, so I cannot
> use:
> 
> . insheet using file, delim(" ")
> 
> The only way I figured out is to count the number of
> variables first (e.g., using Perl) and then use:
> 
> . infile var1-var# using file
> 
> Is there a more direct way?  Thanks!
> 
> btw, I am using Stata 8.2.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> *
> *   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/
>

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