library0: library0

Description Usage Arguments Details Examples

Description

library0 is an alternative to library, which also installs the package if needed. It is also compatible with GitHub package without using additional libraries.

Usage

1
library0(package, force.update = FALSE)

Arguments

package

the name of the package, given as a name or character string. It also supports the GitHub package name for both installing and loading.

force.update

Optional. Logical. It indicates if the package should be updated even if is installed.

Details

This is an alternative function to library, which pretends to be an easier way to attach and install a package in the same step. You can indicate the package as a string or directly by the name. It also works with GitHub packages through the install-github.me service, which is based on remotes

Examples

1
2
3
4
5
6
7
## Not run: 
# Load and install (if so) CRAN and GitHub R packages, and automatically as character strings or not
library0("ggplot2")
library0(ggplot2)
library0(hadley/devtools)

## End(Not run)

ahornero/alternatives documentation built on May 12, 2019, 1:59 p.m.