install_and_load_pkgs: (Install and) load packages.

Description Usage Arguments Examples

View source: R/install_and_load_pkgs.R

Description

This function checks if each package that needs to be loaded has been installed, installs any that are not, and then loads all of the listed packages.

Usage

1
install_and_load_pkgs(pkgs_needed)

Arguments

pkgs_needed

Input a character vector of the packages you want to install/load. Can be a single package (e.g., "dplyr") or multiple (c("dplyr", "tidyr")).

Examples

1
2
3
4
5
## Not run: 
pkgs_needed <- c("tidyverse", "zoo", "openxlsx")
install_and_load_pkgs(pkgs_needed)

## End(Not run)

gcpsresearch/refuns documentation built on June 23, 2020, 11:02 a.m.