FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
6 stars 2 forks source link

Error with install_load_cran_packages() and packages that have not been installed interactively #215

Closed kelliemac closed 1 month ago

kelliemac commented 1 month ago

Knitting a report with install_load_cran_packages('pkgName') for an R package pkgName that has not been installed interactively gives the following error:

Error in `contrib.url()`:
! trying to use CRAN without setting a mirror
Backtrace:
 1. VISCtemplates::install_load_cran_packages(packages)
 2. base::lapply(...)
 3. VISCtemplates (local) FUN(X[[i]], ...)
 4. utils::install.packages(package)
 5. utils::contrib.url(repos, "source")

@slager this appears to have been caused by the changes in https://github.com/FredHutch/VISCtemplates/pull/163