usePackage: Package installing and loading function

View source: R/package-related.R

usePackageR Documentation

Package installing and loading function

Description

The usePackage function takes a single command, the name of a package, and will install it, if not already installed, and then load it. Taken from https://github.com/sussyfuss/usefulScripts

Usage

usePackage(p, repos = "http://cran.us.r-project.org")

Arguments

p

A package name as a string in quotes.

repos

Defaults to US cran otherwise put a cran mirror in as character

Examples

 usePackage("readr") 

TheZetner/utilitarian documentation built on Aug. 13, 2022, 12:31 p.m.