Load the complete tidyverse: dplyr, tidyr, ggplot2, readr, stringr, purrr, tibble, forcats.
pkgs_tidyverse <- c("dplyr", "tidyr", "ggplot2", "readr",
"stringr", "purrr", "tibble", "forcats",
"lubridate", "glue")
install_if_missing <- function(pkgs) {
missing <- pkgs[!pkgs %in% rownames(installed.packages())]
if (length(missing)) install.packages(missing)
invisible(lapply(pkgs, library, character.only = TRUE))
}
install_if_missing(pkgs_tidyverse)