Created
September 15, 2023 16:03
-
-
Save monkeycycle/7a6959c3a709a5a4ed8866417fc5a472 to your computer and use it in GitHub Desktop.
R install and load necessary packages
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
# List of packages for session | |
package_list = c('devtools', | |
'here', | |
'tidyverse', | |
'janitor', | |
'magrittr', | |
'parsedate') | |
# Install CRAN packages (if not already installed) | |
installed_packages <- package_list %in% installed.packages() | |
if(length(package_list[!installed_packages]) > 0) install.packages(package_list[!installed_packages]) | |
# Load packages into session | |
lapply(package_list, require, character.only=TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment