Hello,
I am working on a project where I've installed renv
, and run init()
in the project folder.
In the header section of our code we have the following workflow:
#list of necessary pacakges
listOfPackages <- c('tidyverse', 'lubridate', 'renv', 'etc')
#loop to load packages, and install if not installed previously
## remember: if you add a package, then you have to run renv::snapshot() to add it to the lockfile
for (i in listOfPackages){
if(! i %in% installed.packages()){
install.packages(i, dependencies = TRUE)
}
#load packages
library(i, character.only = TRUE)
}
I know this workflow is mentioned as not visible for renv, but my question is do we need to run the install.packages step at all anymore if we're relying on renv?
Thanks!