require_packages
is function for librarying required packages and installing missing packages if needed.
require_packages(pkg)
A list or vector of names of required packages.
packages installed and library.
# NOT RUN {
require_packages(c("dplyr","ggplot2"))
# }
Run the code above in your browser using DataLab