Hi, this is a tough problem because it goes beyond just specific package versions in scripts. There is versions, which can partially address the problem (at least going back five years), but there's no guarantee that any particular earlier version of a package is going satisfy dependency requirements of a current or even recent version of another package.
To minimize this type of problem and related gotchas, what I do in my one-person shop is:
- Keep the OS at its current version (and in my case XCODE and its command line tools)
- Keep R at its current version
- Run update.packages() at least daily
- Put Rmd files in RStudio .Rproj directories under git control
It's unreasonable to expect to have an organization in which all users follow this discipline. If there's no IT or they are an "everything is already perfect, if only we could eliminate users" bent, I'd take a look at some of RStudio.com commercial products. (No, I don't get a commission or freebies, sniff.) Exposing the functionality through a Shiny Server allows a single point of control for versioning and other maintenance issues without any burden on users.