Using Packrat with a project

During the creation of our package, we saw the option to use Packrat with this project. Packrat is a very important tool when you make your package as reproducible as possible. It basically stores all the packages needed and so creates a private package library. When you load this package, R will automatically restore the needed packages from this private library.

We can set up our project to use Packrat right when you create it. In the dialogue box we just have to check the Use packrat with this project checkbox. RStudio will then set up our private library and fill it with the packages.

When we look at the package pane, we can see the content of our packrat library. This private library has an extra column showing ...

Get Mastering RStudio – Develop, Communicate, and Collaborate with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.