---
layout: post
title: "Using renv to track the version of your packages in R (CC229)"
blurb: "Automate what packages get loaded"
author: "PD Schloss"
date: 2022-07-11 11:00
comments: false
youtube: yc7ZB4F_dc0
start_hash: 867ed3dfae24b2c0b53b575ecc8e272272e5069a
end_hash: f36be4e57aff1157b529d4d37b260fd3efe641b9
---

Posting your R code is good. But posting your code with instructions for what R package versions need to be installed will take your reproducibility to another level. In this episode, Pat uses the renv R package to show you how to set up a project and keep track of the packages and versions that you are using. Then he shows how anyone can grab a copy of your project from GitHub and recreate your package environment


<iframe style="margin: 0 auto;display:block;" width="560" height="315" src="https://www.youtube.com/embed/{{ page.youtube }}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>


## Code

You can browse the state of the repository at the
* [beginning of the episode](https://github.com/riffomonas/climate_viz/tree/{{ page.start_hash }})
* [end of the episode](https://github.com/riffomonas/climate_viz/tree/{{ page.end_hash }})
