On a company computer, not installing packages


I have RStudio Pro on my company's computer, where I am not the admin (not sure if that matters), and I am unable to install any of the packages. Here is the error I get:

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

If anyone knows, how can I fix this I would greatly appreciate it.

If you enter https://cran.rstudio.com/src/contrib/PACKAGES as the URL in a browser, can you get there? If not, there is probably some restriction on your network preventing access.

I can get to that page, but how do I use it to install then?

If you cannot download that file from R like this:

download.file("https://cran.rstudio.com/src/contrib/PACKAGES", tmp <- tempfile())

then maybe you are using a proxy that is not set for R?

In this is the case, then you need to set the http_proxy and https_proxy environment variables to point to your proxy.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.