Boolean. Stop if not installed. If FALSE and
library is not available, warning will be shown.
load
Boolean. Load library?
lib.loc
Character vector. Location of R library trees
to search through, or NULL. The default value of NULL
corresponds to all libraries currently known to .libPaths().
Non-existent library trees are silently ignored.
# Check if library base is installed. If not, stop and show errortry_require("base", stop = TRUE)
# Check if library xxx is installed. If not, show warningtry_require("xxx", stop = FALSE)