R CMD BATCH doesn't load .Rprofile, so doesn't use renv and uses different package versions.
Solution:
at the top of workflow.R source(".Rprofile"). This doesn't work though, unless you provide an absolute path or setwd(), both of which aren't great solutions. Maybe can do somethuing like setwd(../..)?
R CMD BATCH doesn't load .Rprofile, so doesn't use
renv
and uses different package versions.Solution: at the top of workflow.R
source(".Rprofile")
. This doesn't work though, unless you provide an absolute path orsetwd()
, both of which aren't great solutions. Maybe can do somethuing likesetwd(../..)
?