Hi all,
I am trying to read data into Stata 13 from a text-file which has a format as in the attached file (test.txt). Essentially the file is one long string and one observation is 125 characters, sometimes including blank spaces. After 125 characters a new observations starts and there is no delimiter.
I tried reading the data using:
infile str125 v1 using "test.txt"
However, this gives me the following dta.-file (attachment: Test.png). So the infile command apparently can’t handle blanks in the 125 character string and starts a new observation. Is there any way to tell infile that it should include blanks in the string variable?
Best regards
Carlo
I am trying to read data into Stata 13 from a text-file which has a format as in the attached file (test.txt). Essentially the file is one long string and one observation is 125 characters, sometimes including blank spaces. After 125 characters a new observations starts and there is no delimiter.
I tried reading the data using:
infile str125 v1 using "test.txt"
However, this gives me the following dta.-file (attachment: Test.png). So the infile command apparently can’t handle blanks in the 125 character string and starts a new observation. Is there any way to tell infile that it should include blanks in the string variable?
Best regards
Carlo
Comment