-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.R
17 lines (16 loc) · 921 Bytes
/
install.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Install the renv R library from source (to get the same version as in the lockfile).
# The renv library will be located on the docker image, in the /home/rstudio directory,
# yet it will use the renv.lock file located in the project's main directory to determine which dependencies to install.
setwd('/home/rstudio')
options(renv.consent = TRUE)
write("options(renv.consent = TRUE)",
file="/home/rstudio/.Rprofile", append = TRUE)
install.packages('https://cran.r-project.org/src/contrib/Archive/renv/renv_0.13.1.tar.gz',
repos = NULL, type = 'source', dependencies = TRUE)
renv::init(force = TRUE)
renv::restore(confirm = FALSE)
# Uncomment and adapt to install additional R dependencies.
# The installed packages will not be included in the project's renv.lock file
# unless you call renv::snapshot() and commit the changes.
# See README.md for a prefered way of installing R packages.
# install.packages('here')