The .Rprofile always sets the renv project folder to the folder from which the R session is stared. Prerequisite: the folder needs to contain the .Rprofile.
Result: if started in a run folder, renv uses the renv-library from the run folder and not from the REMIND main folder.
cd /p/tmp/dklein/remind-renvtest/
Rscript -e "setwd('output/testOneRegi'); system('Rscript -e \"renv::project()\"')"
cd output/testOneRegi/
Rscript -e "renv::project()"
Both return [1] "/p/tmp/dklein/remind-renvtest/output/testOneRegi"
Purpose of this PR
Fixing https://github.com/remindmodel/development_issues/issues/305
The
.Rprofile
always sets the renv project folder to the folder from which the R session is stared. Prerequisite: the folder needs to contain the.Rprofile
. Result: if started in a run folder, renv uses the renv-library from the run folder and not from the REMIND main folder.Both return
[1] "/p/tmp/dklein/remind-renvtest/output/testOneRegi"
Type of change
Checklist:
remind2
where it was neededforbiddenColumnNames
in readCheckScenarioConfig.R in case the PR leads to deprecated switchesFAIL 0
in the output ofmake test
)CHANGELOG.md
has been updated correctlyFurther information (optional):