# Check if haven is already installed and if it is, load it.
if (!require(haven)){
# If it's not intalled, then tell R to install it.
install.packages("haven", dependencies = TRUE)
# Once it's installed, tell R to load it.
library(haven)
}Loading required package: haven