R setup
In early January, we’ll create an installation guide for R and RStudio (based on this one: https://iqss.github.io/dss-workshops/Rinstall.html), together with instructions for installing packages, so that all participants can arrive with working R environments.
For now, we just need to install and load the necessary packages for the current material:
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if(length(new.pkg)) install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
packages <- c("viridis", "glmmTMB", "effects", "dataverse", "sf", "remotes",
"leaflet", "mapview", "htmltools", "htmlwidgets", "tigris",
"lubridate", "DHARMa", "tidycensus", "tidyverse", "tidymodels")
ipak(packages)
## viridis glmmTMB effects dataverse sf remotes
## TRUE TRUE TRUE TRUE TRUE TRUE
## leaflet mapview htmltools htmlwidgets tigris lubridate
## TRUE TRUE TRUE TRUE TRUE TRUE
## DHARMa tidycensus tidyverse tidymodels
## TRUE TRUE TRUE TRUE