Sorry, I should have been more specific. What I would really like is to not have the compiled packages but only the sources. What happens for me now, when I run R (not Rscript), is that the packages are automatically compiled from source to fit the current version of R. If you delete the lib folder, invoking Rscript does nothing.
Maybe I am taking the wrong approach. The problem I am trying to solve with packrat is the following:
I run a piece of software (GATK for analysis of DNA sequences) on a computer cluster with different versions of R available (for reproducibility). GATK uses Rscript a few times to generate some plots, and it requires certain R packages to do so. I would like for people to be able to run my pipeline without having to worry about installing specific versions of the packages.
However, Rscript is called as "Rscript (resource)org/broadinstitute/gatk/engine/recalibration/BQSR.R [input files]", and hence BQSR.R is in a folder not containing packrat. I would like something (an alias, maybe?) telling Rscript to always use a specific ratpack environment no matter where the R script resides. Is that possible?
Thanks,
Michael