We have a file which is not reading via read.table but it is correctly reading via fread.
i m unable to attch the file here.The commands are as follows:
ReplicaVarience <-read.table(VarienceFilesList,stringsAsFactors = FALSE,header = FALSE,sep=",",skip = 1,quote="")
It gives an error saying
;Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : </error><error> line 2312 did not have 12 elements</error><error>Calls: read.table -> scan</error><error>Execution halted</error></CmdOutputWithActivityOutput>com.tibco.pe.plugin.ActivityExceptionActivityExceptionBusinessProcesses/SubProcesses/Replica/RunReplicaMain.process/Group/Generate-Error-3BW-R-200124</ns0:ErrorReport>
fread() from the data.table package has a whole bunch of features that distinguish it from base R read.table().
The wiki page linked to below has a list of "Convenience features of fread()".
It's hard to tell what exactly is going on without knowing what your data looks like, though. I would recommend just using it (fread()) over read.table() if it's working for your needs. It's more performant, too.
Aside: You don't actually need to set stringsAsFactors = FALSE in the fread() command, since that is the default. It also has auto-detect for header and sep arguments.