I am using -import delimited- to import a file with whitespace separating values. As far as I can tell, any leading whitespace is interpreted as a delimiter and becomes a missing value. Is there any solution other than modifying the input file? Here is a simple demonstration:
Notice how the "1.00" in the first observation is preceeded by a single space, which convinces Stata that there are two variables, and the first is missing. I really don't want to change the format of the input data, and no other program seems to take this interpretation of whitespace used as a delimiter.
Code:
. type test.raw
1.00
2.00
. import delimited using test.raw,delimiter(whitespace,collapse)
(2 vars, 2 obs)
. list
+---------+
| v1 v2 |
|---------|
1. | . 1 |
2. | 2 . |
+---------+
. version
version 14.2

Comment