Last active
September 22, 2020 11:27
-
-
Save statzhero/3c259847b57419a940ccc8f5ecf163bf to your computer and use it in GitHub Desktop.
This file contains 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
## SETUP AND FUNCTIONS ------------------------------------------------- | |
load_packages <- function(x) { | |
# Install CRAN packages (if not already installed) | |
.inst <- x %in% installed.packages() | |
if(length(x[!.inst]) > 0) install.packages(x[!.inst]) | |
# Load packages into session | |
sapply(x, require, character.only = TRUE) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment