loadLibs: Load libraries into working space

View source: R/rmd.util.r

loadLibsR Documentation

Load libraries into working space

Description

It loads libraries successfully in certain scenario where require/library fails.

Usage

loadLibs(failedPackages)

Arguments

failedPackages

(character vector) names of libraries to load

Details

This function loads libraries into the working space. It iterates over each path in .libPaths() using require until a library is loaded successfully. In comparison, require(x) for a library x fails if x is present in multiple search paths but the 1st presence causes loading error, e.g. due to dependency or other issues.

It raises error if not all libraries are loaded successfully.

Value

none

Examples

library(wfr)
loadLibs(c("ggplot2","flextable"))

blueskypie/wfr documentation built on Feb. 6, 2024, 4:38 p.m.