I attempted to leave a comment on this post "What is the behavior of install packages in case multiple repos are specified" but unfortunately don't have enough reputation yet so am starting a new, very similar question.
Essentially like the OP in that post, I am looking to set up a local repository of specific versions of widely used packages in my org. We have a lot of people using a lot of different scripts, however people usually come to me for R help and it can be difficult to debug when everyone is on different versions of the packages. I thought the easiest way would be to create a local repo for the team where all packages are installed from if possible that I maintain and test. Then if a package isn't in this repo, it's not a widely used one and defaults to installing directly from global CRAN. This will allow me to test our scripts for version issues before updating everyone off of a version that works, whilst still allowing the team to use obscure packages if necessary.
Is there a way to set up this fallback repo, or is there perhaps a better way people recommend that I'm not aware of for team-wide version control? I know that, for example, in pip/python you can have a requirements.txt
file with all required packages and versions, so you just run pip install requirements.txt
and it'll install exactly those versions of the packages listed. Does something like this exist for R perhaps? I know I could build a package as an option for this but that is a decent amount of extra development time, so would prefer to find a different way around first before going into this development time.
Hopefully that all makes sense, thanks for your answers in advance!