Problem with Import(type=raw)
Posted: Wed Nov 20, 2019 1:38 am
I have a problem with Import(type=raw) with some text files we get from our sub contractor. To show the problem I have created 2 files. First data.txt which is a shorted down version (with changed numbers) of the file we get from our sub contractor. Second is data2.txt, which is the same file, but in each row a space is added arround column 80.
We use code similar to
to imort the data. Each column is its own variable.
The part that I have had problems with is the first columns. In this specific case it is columns 2 and 6 that gets strange. While the other columns get 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5 as their values (as expected), columns 2 and 6 skips the values 8 and 9, and puts two NA values at the bottom instead (1,2,3,4,5,6,7,0,1,2,3,4,5,NA,NA).
I have not been able to find exactly what the problem is, but for example adding a column in the middle often seems to make it work. Deleting one column in the middle sometimes works, but sometimes it skips 1 value instead. We have tested this on both Eviews 10 and 11 on 4 different computers, all getting the same result. Since adding/deleting columns in the middle of the rows changes the result, and since we can't find any strange symbols at end of line, only linefeed and carige return (checked with hex-editor as well), it seems like it isn't the file that is the problem, but a bug in Eviews Import.
We use code similar to
Code: Select all
Import(type=raw) .\Data.txt names=bhus01, fieldtype=fixed, rformat=1 The part that I have had problems with is the first columns. In this specific case it is columns 2 and 6 that gets strange. While the other columns get 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5 as their values (as expected), columns 2 and 6 skips the values 8 and 9, and puts two NA values at the bottom instead (1,2,3,4,5,6,7,0,1,2,3,4,5,NA,NA).
I have not been able to find exactly what the problem is, but for example adding a column in the middle often seems to make it work. Deleting one column in the middle sometimes works, but sometimes it skips 1 value instead. We have tested this on both Eviews 10 and 11 on 4 different computers, all getting the same result. Since adding/deleting columns in the middle of the rows changes the result, and since we can't find any strange symbols at end of line, only linefeed and carige return (checked with hex-editor as well), it seems like it isn't the file that is the problem, but a bug in Eviews Import.