R에서 한글 (encoding 관련) – csv, xlsx…

Published by onesixx on

기본설정

R studio > tools >

  • Global options… > Code > saving > Default text encoding: UTF-8
  • Project options… > Code Editing > Text excoding: UTF-8로 설정

Linux ( Ubuntu)

일단 Ubuntu의 locale설정이 제대로 되어 있어야, 웹상에 해결방법이 잘 적용된다.

https://lintut.com/how-to-set-up-system-locale-on-ubuntu-18-04/

system locale확인 방법

Shell
Shell

설정가능한 모든 locale

Shell

사용하고자 하는 system locale for the region이 없을 경우, 아래 명령어로 화면에서 추가해 준다.

Shell

locale 수정

Shell

수정후에는 logout해주어야하고, 확인 후 R도 restart해준다.

encoding을 고려한 read 함수

http://philogrammer.com/2017-03-15/encoding/
R
R
https://studyforus.tistory.com/167

RStudio encoding설정

  • Tools -> Global Options…
    Code> Saving     “Default text encoding: ” : “UTF-8”
  • Tools -> Project Options…
    Code Editing     “Text encoding: ” : “UTF-8”
https://r-bong.blogspot.com/2016/03/rstudio_26.html
R
R
Categories: R Basic

onesixx

Blog Owner