require.quiet silently requires a package, and qrequire is an alias to require.quiet.
require.quiet(...) qrequire(...) qlibrary(...) mrequire(msg, package, lib.loc = NULL, quietly = FALSE)
| ... | |
|---|---|
| msg | error message to use, to which is appended the string
|
| package | name of the package to load. |
| lib.loc | a character vector describing the location of R
library trees to search through, or |
| quietly | a logical. If |
qlibrary: silently loads a package.
mrequire: tries loading a package with base require
and stops with a -- custom -- error message if it fails to do so.
Other require:
irequire()
mrequire('Running this example', 'stringr')#>#>#> Warning: there is no package called ‘notapackage’#> Error in mrequire("Doing impossible things", "notapackage") : #> Doing impossible things requires package 'notapackage'