Last active
August 24, 2017 23:16
-
-
Save larsvilhuber/d4db2e72b05a2e87e0b083f56192f6dd to your computer and use it in GitHub Desktop.
Work with CRAN mirror on SDS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CRAN_base <- "file:/cac/contrib/mirror/CRAN/" # location of the local CRAN mirror - this will be different at validation! | |
# set CRAN base, ensuring that install.packages() can find its files | |
mypackages <- c("xyz","abc") | |
local({ | |
r <- getOption("repos") | |
r["CRAN"] <- CRAN_base | |
options(repos = r) | |
}) | |
install.packages(mypackages) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment