>install.package(“nameofpackage”) # installs a package
>library(“nameofpackage”) # loads an already installed package, you can use a package only after loading it
>installed.packages() # lists installed packages (not necessarily loaded)
One can install multiple packages at once with a single call by placing the names of the packages in a character vector.
install.packages(c(“tidyr”, “devtools”, “dplyr”, “ggplot2”))