Rstudio won't load pacman or any other package for me

Error Information:

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Warning in install.packages :
  unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/4.2:
  cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/PACKAGES'
> pacman::p_load(pacman, dplyr, GGally, ggplot2, ggthemes, 
Warning message:
In download.file(mirrors_csv_url, destfile = mirrors_csv, quiet = TRUE) :
  URL 'https://cran.r-project.org/CRAN_mirrors.csv': Timeout of 60 seconds was reached
+   ggvis, httr, lubridate, plotly, rio, rmarkdown, shiny, 
+   stringr, tidyr)

Description of issue -
I cannot load any packages and I believe it is probably because I installed Rstudio as a zip file and extracted the file into the downloads folder. The R folder was extracted into downloads as well but independent of Rstudio. I did this because installing Rstudio using the .Exe file requires admin privileges which I do not possess. If this is why I can't access reporsitories on CRAN, how can I arrange the folders to solve this problem?
Steps taken so far -
I've unticked 'Use secure download method for HTTP in Global options > Packages

System Information:

  • RStudio Edition: (Desktop or Server)
  • RStudio Version: 2022.02.3 Build 492
  • OS Version: Windows
  • R Version: 4.2.0

Also: I believe this may be related to an issue experienced by a user on this thread and a solution was found involving the startup file but I am quite new to how R and Rstudio interact and new to the software so I do not know what the actual fix was:

[Unable to access index for repository: warning in install.packages - #5 by canis_arcticus] [Unable to access index for repository: warning in install.packages]

  • RStudio diagnostics report:
  • Your sessionInfo():
  • RStudio crash report:
  • RStudio application log files:

From Troubleshooting Guide: Using RStudio

This seems like a connectivity issue, R is not being able to connect to the CRAN repository you have selected, these are some things to try.

  • Choose a different CRAN repository, RStudios repository is a good choice (http://cran.rstudio.com/) or you could choose one that is geographically closer to you.
  • Disable secure download setting.
  • Check if your internet connection has traffic restrictions of some kind, like a firewall, proxy server, etc. This is usually the case when you are at work or school.

Hi, I have attempted both these steps and still am unable to install packages. I use a work computer remotely so I do not have admin privileges. I assume I would not have any issues if I downloaded rstudio directly with the .exe installation file instead of using the .zip method. But in library installation path, it is correctly configured to the R folder directory.

If it's a work computer, most likely you have connectivity restrictions that prevent you to connect to the CRAN repositories. I don't think this has to do with the installation method per se.

If I was you, I would ask my security/IT department to take a look and possibly "white list" CRAN URLs

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.