본문 바로가기
통계데이터과학/통계학개론

R 에서 locale 설정하기 (Message Transaction)

by 문파워 2022. 2. 21.

 

R Console 출력을 영어로 하려면 R 설치 단계에서 부터 Message Transaction 체크박스를 해제하고 설치해야 된다고 한다.

그런데 나는 R 설치시 사용자 설정에서 사용자 설정을 찾을 수 없었다 (Message Transaction 은 안보였는데 ..)  

 

 

 

1. R을 먼저 설치하고
2. RStudio 를 설치하는데 

 

1. R Console 에 아래와 같은 경고문이 보이고

 

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_COLLATE failed, using "C" 
3: Setting LC_TIME failed, using "C" 
4: Setting LC_MESSAGES failed, using "C" 
5: Setting LC_MONETARY failed, using "C" 
[R.app GUI 1.77 (8007) x86_64-apple-darwin17.0]

WARNING: You're using a non-UTF8 locale, therefore only ASCII characters will work.
Please read R for Mac OS X FAQ (see Help) section 9 and adjust your system preferences accordingly.
[History restored from /Users/k2/.Rapp.history]

 

2. RStudio 의 Console 문구가 한글로 출력되었다.

 

 

R 재설치를 시도했지만, 설정 옵션을 찾을수가 없어서 

설치 이후에 재설정 하는 방법을 찾아보았다.

 

방법은 간단하다.

 

R Console 에서 아래 커맨드를 복사 붙여넣자!

> system("defaults write org.R-project.R force.LANG en_US.UTF-8")

그리고 RStudio 를 열어보면 RStudio Console 에 영어로 출력되는 것을 확인할 수 있다.

* 영어로 출력되는 경우 좋은 점

분석 중에 오류 문구가 한글일 경우 구글링 정보가 제한적이다

오류 문구가 영어일 경우 구글링하기 좋다!

 

참고) https://stackoverflow.com/a/22945233

 

Installing R on Mac - Warning messages: Setting LC_CTYPE failed, using "C"

I would like install R on my laptop Mac OS X version 10.7.3 I downloaded the last version and I double click on it and it was installed, when i start up I get the following error, I searched in in...

stackoverflow.com

 

'통계데이터과학 > 통계학개론' 카테고리의 다른 글

기술 및 추론 통계란 무엇인가?  (0) 2022.02.06

댓글