IN R SETTINGS
setInternet2(TRUE) # force R to use Internet Explorer proxy settings
To set it by yourself
Sys.Setenv(http_proxy="host:port")
To make these changes every R sessions
RProfile can be used to customize R sessions.
Its stored at R-3.x\etc\Rprofile.site
You can add 2 functions,one to run at start(.First) and other to run on exit(.Last)
for eg:
.First <- function() {
utils::setInternet2(TRUE)
}
will ensure R uses the explorer settings each time it opens
IN OTHER COMMON HTTP PACKAGES
httr
set_config (use_proxy ("url", port))
RCurl
options (RCurlOptions = list (proxy ="url:port",proxyuserpwd="domain\\username:password",proxyauth="ntlm")