Error in read.table " no lines available in input"


I am using R to read my file and stuck with an error. I am new to R community. Any help is much appreciated. Here is the command and error:

decoder.file <- system.file("~/R/Splicejunction/annoFiles/decoder.bySample.txt",

  •                         package="JunctionSeq");

decoder <- read.table(decoder.file,

  •                   header=TRUE,
  •                   stringsAsFactors=FALSE);

Error in read.table(decoder.file, header = TRUE, stringsAsFactors = FALSE) :
no lines available in input
In addition: Warning message:
In file(file, "rt") :
file("") only supports open = "w+" and open = "w+b": using the former

Hi @SC791, welcome to RStudio Community.

I'm not sure why you are using system.file(). You just need to pass the file path as a string. Does it work if you modify your read.table() call as follows:

           stringsAsFactors = FALSE)

Hi! sidhartprabhu,

Thank you! for your reply.
yes, it is working fine now. Sorry I am just new to R and just using others pipeline.


If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.