I have the following state in the R console of R-Studio:
> options('repos')
$repos
[1] URL of our proxy server
But when I run
system("R CMD check ./")
I get the following error message (translated from German):
\* checking package dependencies ... Warning: cannot access index for repository
https://CRAN.R-project.org/src/contrib
The check then fails. What can I do about this?
The checks are run in a separate process running R, so any options settings in RStudio won't be seen.
There are several ways to set the repositories described in the help page
?setRepositories. If you want to use the repositories for everything, not just this run, then editingR_HOME/etc/repositoriesis most permanent. For more flexibility you could do this in one of the startup files by callingoptions(repos=...)there, possibly conditioning on an environment variable or something else.