0

I've spent the last 4 hours trying to find out why I wasn't able to install any packages in R (it started with me trying to install a package I was developing). It would just stall for +5 minutes without doing anything or outputting anything to the terminal. I tracked the issue down to the following call:

repos <- structure("https://cran.rstudio.com/", .Names = "CRAN")
type <- "both"
utils::available.packages(utils::contrib.url(repos, type), type = type)

I realized after a while that it was just the RStudio CRAN mirror, and when I changed the repo to "https://cran.case.edu/", it started working. However, there was literally no indication of this on the surface--and it took forever for me to find out what the problem was.

My question is this: Is there a way of using multiple CRAN repos so when one fails, others are used? Or at least a way that will prevent this from happening again?

Hugo y
  • 1,421
  • 10
  • 20
Zeke
  • 617
  • 1
  • 6
  • 15

0 Answers0