library_pls: Library please! Easier Package Installation

View source: R/library_pls.R

library_plsR Documentation

Library please! Easier Package Installation

Description

If the last error was raised due to calling library() on a missing package, install from CRAN and load the package.

Usage

library_pls(package)

Arguments

package

The package to install.

Examples

## Not run: 
library(parallel)
# Error in library(parallel) : there is no package called ‘parallel’

library_pls(parallel)
# Install package parallel?
# (y/n) y
# Installing package …

## End(Not run)


Kudusch/ktools documentation built on Oct. 30, 2022, 10:13 p.m.