How to make R's read_csv2() recognise the text characters properly

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 15:20:13

@Amit, thanks for your suggestion.

On the RStudio, I have selected File\Save with Encoding... to see some of the available encoding options.

On the popped up window at the top of the encoding list it shows the system default (which is CP1254 for my computer). Then passed it to the encoding parameter as below and it worked!

my_df <- read_csv2("my_path/my_file.csv", locale(encoding = "CP1254"), col_names = TRUE, col_types = NULL)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!