Using R, I am reading a file with fread, is a file with many columns and rows. The file looks like this:
1_17118 1_18353 1_21882 1_21955 1_22054
Ind0001 -1 -1 -1 -1
Ind0002 -1 -1 -1 -1
Ind0003 -1 -1 -1 -1
Ind0005 -1 -1 -1 -1
Ind0006 -1 -1 -1 -1
I am reding the file like this:
M <- fread("file.txt")
And im getting the next error:
Error in fread("file.txt") :
embedded nul in string: '\xff\xff\xff\001\0\0'
Execution halted
I read another file that looks very similar and I didn't have this problem before.
My columns, except for the header ant the first column have -1, 1 and 0. I guess that there should be a string inside the -1, 1 and 0 and this is causing the problem. Do you know how I could identify any string inside my file? I tried several possibilities with grep. But I am not sure how to look for any string. Do you know how I could solve this problem?