Open JulioV opened 3 years ago
I've run into similar issues. Things get more complicated if the user has rmarkdown
installed in their personal library and has R_LIBS_USER
set to point to that library. In that case, the command you mentioned will load the user's home copy of rmarkdown
, which can cause unexpected problems if the versions of rmarkdown
don't match up.
It might be possible to set R_LIBS_USER
locally, something like:
R_LIBS_USER=renv/library/R-4.0/x86_64-pc-linux-gnu Rscript --vanilla ....
Snakemake version 5.7.1
Describe the bug When executing a rule targeting a Rmarkdown file, the command fails because the package
rmarkdown
cannot be loaded. This happens becausermarkdown
has been installed withrenv
but thevanilla
flag in'Rscript --vanilla -e \'rmarkdown::render("{fname}"...
ignores the local.Rprofile
https://github.com/snakemake/snakemake/blob/53afe6d1cbea058de3ad440062c751167d2e463b/snakemake/script.py#L737
Logs
Additional context I'm not sure what would be the best way to solve this? Remove the
vanilla
option? Have a flag to source apackrat/renv
environement (renv/activate.R
)?