Some data!

Tidy workflow

  • screen-cap'd from Hadley Wickham's useR 2016 talk on the Tidyverse

6 months later…

  • Sharing code with colleague
    • "Clone my repo, it's all in there"
    • Packages no longer on CRAN
    • Packages have been updated: code breaks/behavior changes
  • Problematic if you need to update results or reproduce work

What packrat solves

AKA why you should use it

  • Everything that happens inside this box occurs within an environment

What is it?

  • A package dependency management system for R
    • Influenced by bundler for Ruby
    • Developed by RStudio
      • designed to work well with projects (.Rproj files)
    • Ensures projects maintain reproducibility long-term
  • Need to be able to build packages in order to use

What is it?

Basic concepts

  • Private Package Library
    • local package tar balls (source code)
  • Snapshots
    • current state of a project
  • Restoring
    • rebuilding a project's environment based on a snapshot

Updated workflow