Module 10 of 10

Packages & Best Practices

Lessons

About This Module

Much of R's power comes from the thousands of packages that people share with the community. This module shows how to find, install, and load them, both from CRAN, R's main package repository, and from GitHub, and how to tell a package apart from the library folder where it is stored.

You'll then look at habits that keep projects dependable over time: working inside an RStudio project, loading packages in one place, and using renv to record the exact package versions a project uses so that it still runs the same way on a new machine or for a collaborator. These practices help make your analyses reproducible.

This is the final module. Once you finish the lessons, continue on to the course Projects to put everything together.

Lessons

4 videos
01

R Packages: CRAN

Introduces R packages with examples of installing and loading them from CRAN, including some common errors and warnings you may run into.

02

Installing R Packages in RStudio & from Github

Shows how to install R packages in RStudio, both from the main CRAN server and from GitHub.

03

Reproducible Environments using renv

A webinar from Posit on how the renv package helps you create reproducible environments for your R projects.

04

Practical {renv}

Shannon Pileggi’s talk on using the renv package in practice to build reproducible environments for R projects.