I want to inspect a file before processing it in R.
It is possible, that my input file is broken and contains nul values, due to a software crash. So I want my script to have a look at the data before continuing the process.
If I do a read.csv(..., skipNul = TRUE)
, the nuls were skipped and the script doesn't stop. But this is bad, because I don't see the lack of data.
If I do a read.csv(..., skipNul = FALSE)
,the nuls were skipped anyway, and I just get a warning message.
I want to count the nuls inside the file. But how can I do this?
I tried to change the encoding, but nuls are never shown when printing the dataframe.