Does anyone know how to load renv before calling a batch script using CMD BATCH instead of RScript.exe, using Windows command line?
You could define a custom profile, and then have that sourced when the command is run. For example:
set "R_PROFILE_USER=C:/path/script.R" R CMD BATCH ...
Then, in that file
script.R, you could perform whatever
renv actions you need to.
Otherwise, you can use the
renv autoloader and just make sure the working directory is set to the project root before launching R.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.