-
-
Save xinbinhuang/63d26c6f91d3e86c96fb7f62c024faf6 to your computer and use it in GitHub Desktop.
Load multiple packages at the same time in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# library() or require() only load one package at a time | |
# but... | |
Packages <- c("dplyr", "ggplot2", "rstan", "readr") | |
lapply(Packages, library, character.only = TRUE) | |
# this loads as many as you put in 'Packages'. They need to be installed first, of course. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment