This is a great question, and an interesting use case - thanks! So part of
packrat's functionality is that it specifically isolates you from the "global" environment, lest you pick up a package that you are not intending and get unexpected behavior / unreproducible results.
However, what you can specify is an "external package." This is explained towards the end of this page: https://rstudio.github.io/packrat/commands.html
An "external package" is one that will be loaded from your user environment, but not acknowledged / recorded in the packrat.lock file.
Note that a "newer" version of
packrat has been created, in case it interests you. It is called
renv and it has similar functionality, along with some noteworthy improvements. Let us know if you have any more questions or any issues with this approach!