library(proto)
library(gsubfn)
library(tidyr)
library(dplyr)
library(ggplot2)
library(stringr)
library(magrittr)
library(usmap)
library(RCurl)
library(RJSONIO)
library(sqldf)
For the list of libraries above I did not have corresponding line of code for package installations. I ended up googling the package names and installing them manually.
I am curious what's the best way to install all the required packages when you have a long list of library for your code set and you are not sure which are already installed in your work space or just don't know what packages to install.
Do you use require() function? Not sure if I would want to change the function to load package if the original author would have used install.package() function initially.
I would like to know a more efficient way to getting the packages installed without having to manually google and install them.
pacman::p_load()
is better than the accepted answer imo.p_load
can check and install both packages fromCRAN
andBioConductor
cran.r-project.org/web/packages/pacman/vignettes/… – Tung