Proxy를 통해야만 인터넷이 되는 환경에서 RStudio를 사용하기 위해서는 R 설정에서 Proxy 정보를 추가해야 한다.

 

RStudio Server는 R_HOME/etc/Renviron.site 에 추가하면 되고, RStudio Desktop은 ~/.Renviron 에 추가하면 된다. 

(R_HOME의 경로는 R.home() 명령으로 확인할 수 있다.)

 

RStudio에서 다음 명령어로 쉽게 수정할 수 있다.

file.edit('~/.Renviron')

위 명령어로 스크립트 창이 열리면 아래 내용을 추가한다.

http_proxy=http://proxy.dom.com/
http_proxy_user=user:passwd

https_proxy=https://proxy.dom.com/
https_proxy_user=user:passwd

http_proxy_user 또는 https_proxy_user 는 Proxy에서 계정을 통해 인증을 해야 하는 경우에만 추가하면 된다.

 

적용 후 RStudio를 재시작하면 인터넷 연결이 가능하다.

 

참조: https://support.rstudio.com/hc/en-us/articles/200488488-Configuring-R-to-Use-an-HTTP-or-HTTPS-Proxy

+ Recent posts