please_install: Automatic loading and/or installing of packages.

View source: R/helpers_misc.R

please_installR Documentation

Automatic loading and/or installing of packages.

Description

Load a library, install it first if necessary.

Usage

please_install(lib, update = FALSE)

Arguments

lib

String name of a library to check/install.

update

Update packages?

Details

This was taken from: http://sbamin.com/2012/11/05/tips-for-working-in-r-automatically-install-missing-package/ and initially provided by Ramzi Temanni.

Value

0 or 1, whether a package was installed or not.

See Also

[BiocManager] [install.packages()]

Examples

## Not run: 
 require.auto("ggplot2")

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.