As @edgararuiz metnioned, packrat
is meant for controlling package dependencies on a per-project basis.
You're right that packaging your own code is the right way to go. Packages are the intended way for sharing code and data in a machine-agnostic way. Creating packages was often confusing and frustrating (especially on Windows), but RStudio now makes it so simple. I suggest using the miniCRAN
package for creating your own package repository to store your internal packages (https://cran.r-project.org/package=miniCRAN).