0

I'm trying to automate the creation of an environment in Windows and need to install devtools for R. I can install it manually from R by running install.packages("devtools"). However, when I do this I am prompted to select a mirror.

Is there a way to specify a mirror in a non-interactive way so that this process can be run as part of a larger process?

John
  • 3,458
  • 4
  • 33
  • 54
  • 2
    You mean to specify the repo: `install.packages("devtools", repos = "http://cran.us.r-project.org")` – TarJae Mar 13 '23 at 15:59
  • 3
    @TarJae: I don't know currently, but in the past the `cran.us` mirror was fairly unreliable. I'd recommend `cloud.r-project.org` (or `cran.rstudio.com`, which has been a synonym, but may change since the company changed its name). – user2554330 Mar 13 '23 at 16:17

0 Answers0