I have a large table to read in R, and the file is in format .txt. In R, I use a function read.table, but there is an error reading it. The following error message appears:
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 28 did not have 23 elements
It seems that (counting from the 1st row without regard to the header, as I indicated skip=), the data in line 28 have missing elements. I am looking for a way to automatically fix this problem by filtering this line. At the moment I canβt even read in the file, so I canβt manipulate in R ... Any suggestions are much appreciated :)
source
share