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

st: read text file with multiple spaces


From   Mike Lacy <[email protected]>
To   [email protected]
Subject   st: read text file with multiple spaces
Date   Fri, 19 Aug 2005 07:44:32 -0600

At 12:33 AM 8/19/2005, you wrote:
Date: Thu, 18 Aug 2005 19:35:32 -0700 (PDT)
From: Yu Zhang <[email protected]>
Subject: st: read text file with multiple spaces

It's a shame to ask, but does anyone know how to read
data (text file) with multiple spaces between
variables?
..... (can't use multiple spaces as a delimiter)

Rant mode on: This feature of Stata also cropped up in SPSS several years ago, and is quite unfortunate. It overthrows a very longstanding convention of free format input, perhaps 40 years old, which was to treat multiple occurrences of a space the same as a single space. This contributed considerably to the robustness of free format input, and in fact IIRC was even enshrined as an element of good programming style. I believe, but don't know, that the decision to break this convention was made for all of us by Micro$oft when it implemented its import features in Excel in such a way, and then of course everyone had to follow along.
Rant mode off.

Regards,


=-=-=-=-=-=-=-=-=-=-=-=-=
Mike Lacy
Fort Collins CO USA
(970) 491-6721 office





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