Unable to install packages in Rstudio

ide
ide-issue

#1

Error Information:Warning in install.packages :

unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'

Description of issue - Trying to install "ggplot2" package

Steps taken so far - Proxy settings changes in Tools tab
Antivirus disabled
Tried Referencing directly to the directory

System Information:

  • RStudio Edition: (Desktop or Server)
  • RStudio Version: 3.5.2
  • OS Version: Windows7
  • R Version:

#2

If your internet connection is behind a proxy server, then you have to configure your proxy settings with httr before using install.packages()

library(httr)
set_config(
  use_proxy(url="your.proxy.ip", port="port", username="user",password="password")
)