0

When reading file from ~25G file:

data <- fread(in_path)

I get this:

"Error in fread(in_path) : embedded nul in string: '\\0\\0\\0\\0\\0'\n"

If I do this:

fread(paste("sed 's/\\0//g'", in_path)

The error goes away. I'm worried about doing this without understanding why it works. Should I be worried my data is corrupted? Any way to tell if that is the case? Thanks.

curious
  • 352
  • 2
  • 7
  • It depends. Does `tail(data)` _look_ corrupted? Standard delimited files shouldn't have null bytes in them if they are ascii-encoded, but null bytes may be present in other encodings. I don't think any of them should have a string of 5 null bytes though. – Allan Cameron Feb 05 '22 at 15:11

0 Answers0