You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
install.packages(repos = X) from RStudio does not override the repos R option #13247
There is a default R option for which repos to install from - getOption("repos").
When installing a package using install.packages(), you can provide a repos parameter. The default value of that parameter is getOption("repos"). This parameter should override the R option. In other words, if the parameter is provided, then the R option should be ignored. This is true when using R in the terminal, or when explicitly calling utils::install.packages(), but when calling simply install.packages() in RStudio, that's not the case.
The above code should go right into installation, but instead it first produces the warning below, and then installs.
Warning in install.packages :
unable to access index for repository https://BADNAME.com/src/contrib:
cannot open URL 'https://BADNAME.com/src/contrib/PACKAGES'
Activity
kevinushey commentedon Jun 15, 2023
This is likely happening here:
rstudio/src/cpp/session/modules/SessionPackages.R
Line 158 in 930ebfa
since that tries to check for package updates using the current repositories:
rstudio/src/cpp/session/modules/SessionPackages.R
Lines 810 to 813 in 930ebfa
Perhaps we should pass the repositories down to that call? Or only call it if
reposwasn't explicitly provided?github-actions commentedon Dec 14, 2023
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.