Wednesday, June 15, 2016

How to install packages in RStudio through proxy server

I had this problem of installing packages through proxy server. I found certain useful code online on as how to install packages through http proxy. Do as below.


  1. In RStudio; go to Tools -> Global Option -> Packages. Then uncheck both "Use secure download method for HTTP" and "Use Internet Explorer library/proxy for HTTP"
  2. Go to the console (left bottom side pane) write file.edit("~/.Renviron") then enter. You will find small file named .Renviron in right bottom pane under "Files". 
  3. Click the file .Renviron, now you will get the file opened at left upper pane as script file. Then input the following lines: 
options(internet.info = 0)
http_proxy="http://####:########@192.168.23.32:3128/"
http_proxy_user=ask

     4. Close RStudio and open again now try installing packages. 

No comments:

Post a Comment