r - Get "embedded nul(s) found in input" when reading a csv using read.csv() -
i reading in csv file.
code is:
mydata = read.csv("mycsv.csv", header=true, sep=",", quote="\"")
get following warning:
warning message: in
scan(file = file, = what, sep = sep, quote = quote, dec = dec
, : embedded nul(s) found in input
now cells in csv have missing values represented "".
how write code not above warning?
your csv might encoded in utf-16. isn't uncommon when working windows-based tools.
you can try loading utf-16 csv this:
read.csv("mycsv.csv", ..., fileencoding="utf-16le")
Comments
Post a Comment