R Packages We Use

The following is a compendium of all R packages used in this course (in order of appearance), their main uses, and what we use them for1. Each package name below is a link to the package’s website and/or documentation.

You can install all of these packages at once with the following command:

install.packages(c("tidyverse", "ggrepel", "broom", "car", "estimatr", "lmtest",
                   "huxtable", "infer", "dagitty", "ggdag", "modelsummary", "fixest"))

† Indicates package is part of the tidyverse

Name Type Description/Reason(s) for Use Classes Used
ggplot2 Plotting For nice plots [1.3]
gganimate Plotting For animating plots [1.3]
haven Data Wrangling For importing nonstandard data files [1.4]
dplyr Data Wrangling For manipulating data (part of tidyverse) [1.4]
readr Data Wrangling For importing most data files [1.4]
tidyr Data Wrangling For reshaping data (wide and long) [1.4]
magrittr Data Wrangling For the pipe [1.4]
tibble Data Wrangling For a friendlier data.frame [1.4]
ggrepel Plotting For annotating text that doesn’t cover observations [1.4]
broom Models For tidying regression output [2.3]
car Models For testing for outliers [2.5]
estimatr Models For calculating heteroskedasticity-robust standard errors [2.5]
lmtest Models For testing for heteroskedasticity [2.5]
huxtable Output For making nice regression tables [2.5]
infer Models For simulation and statistical inference [2.6]
dagitty Models For working with DAGs in R [3.2]
ggdag Plotting For plotting DAGs in ggplot [3.2]
modelsummary Output For making nice regression tables [3.5]
fixest Models For working with panel data [4.1]

  1. Note, many of these packages have multiple uses beyond our purposes!↩︎

Previous
Next