I am trying to read a txt file in R but always I am getting

Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
line 113 did not have 10 elements


I noticed that in the header of my file I have something like

 0000775 €   g¿´�€   4_®™00000016125 13404727020 017402  0                                                                                                    ustar   devons01                        stlab-icgc


Even by removing these characters I am not able to read this file

This is link of my file

https://www.dropbox.com/s/rpc5jgti5aa433b/txt.txt?dl=0

• Where is the file from, how was it generated? Looks like an XY Problem. May 8 '19 at 20:21

Delete the corrupt portion preceeding CFS in the header and it works with with read.delim().

• Sorry where is the corrupt portion preceeding CFS ? May 8 '19 at 11:58
• Everything before it. Just open it in a text editor. May 8 '19 at 11:59
• @DevonRyan Couldn't it be a different encoding used?
– llrs
May 8 '19 at 12:39
• @llrs No, there was just a bunch of gibberish. It looks like some other content got added to the front of the file. May 8 '19 at 12:43
• Ok, it's simply when I see this question marks I always suspect of wrong encoding...
– llrs
May 8 '19 at 12:51

We can skip the first row:

read.delim("txt.txt", skip = 1, header = FALSE)


Or we can get the "uncorrupted" version of the table, it looks like it is from this paper, Table S4.