r read.csv 357 273 277

October 20, 2012 by Kinh Nguyen

Error:

Column names start with “\357\273\277”

Due to UTF8 encoding BOM (Byte Ordering Mark). To fix, add fileEncoding='UTF-8-BOM' option, e.g.,

{"display_name"=>"Kinh Nguyen", "login"=>"nguyenkinh", "email"=>"nguyenkinh@ytecongcong.com", "url"=>"https://www.google.com/profiles/112009149785989721279"}
pop <- read.csv('UKpop2011_13.csv', stringsAsFactors=F, check.names=F, fileEncoding='UTF-8-BOM')

Comments

comments powered by Disqus