0

I have problems with read.table function. When data contains more then 10 rows, then rows with 62 columns can't be readed. The part, from 59 to 62, will be placed in to next row.

enter image description here

If i remove rows, changing size of rows to 10, then everything works fine. enter image description here

This is function which i using:

obs_test1 <- read.table("/path/to/file/example.test",skip=1,fill=TRUE)

Can someone explain me what i doing wrong ? Does this read.table functions had some limitations ?

Example file can find here

meteorolog
  • 27
  • 6
  • 1
    It's easier to help you if you provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. How exactly is your raw input file formatted? Does every row have the same number of columns? Are there just spaces between values or some other consistent delimiter? – MrFlick May 04 '22 at 14:05
  • This is probably a problem with your data file not `read.table`. Open the file in a text editor and check to see if those lines are wrapping. It could be that some lines in the file have line returns that are wrapping those particular lines. – dcarlson May 04 '22 at 18:11
  • Example file is added. When file open with notepad, everything looks ok – meteorolog May 05 '22 at 07:22

0 Answers0