This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I fix this error?
raw <- fread("GSE21222_series_matrix.txt", skip = "!series_matrix_table_begin")

Error in fread("GSE21222_series_matrix.txt", skip = "!series_matrix_table_begin") : 
  Expected sep ('   ') but new line, EOF (or other non printing character) ends field 0 when detecting types from point 10: !series_matrix_table_end
r fread error

I have no idea what "!series_matrix_table_begin" is, and it would be lovely if you would put a bit more effort in your question and not just post the error.

The question title should be also more informative.

1 answer

It might be better if you used skip with an integer like 1. This will tell the function to skip the number of lines you declare it to. Also, as the error states, you may want to add in a separator like sep= "\t" if your file is a tab delimited file. Before you do any of this you should read the page on fread for more info on how to use it. https://www.rdocumentation.org/packages/data.table/versions/1.10.4/topics/fread

Log in to answer this question.