| try_require {lares} | R Documentation |
Check if Specific Package is Installed
Description
This function checks library dependencies
Usage
try_require(package, stop = TRUE, load = TRUE, lib.loc = NULL, ...)
Arguments
package |
Character. Name of the library |
stop |
Boolean. Stop if not installed. If |
load |
Boolean. Load library? |
lib.loc |
Character vector. Location of R library trees
to search through, or |
... |
Additional parameters. |
Value
No return value, called for side effects.
See Also
Other Tools:
autoline(),
bind_files(),
bring_api(),
chr2num(),
db_download(),
db_upload(),
export_plot(),
export_results(),
files_functions(),
font_exists(),
formatColoured(),
formatHTML(),
get_credentials(),
glued(),
grepm(),
h2o_selectmodel(),
haveInternet(),
image_metadata(),
importxlsx(),
ip_data(),
json2vector(),
list_cats(),
listfiles(),
mail_send(),
markdown2df(),
move_files(),
msplit(),
myip(),
quiet(),
read.file(),
statusbar(),
tic(),
updateLares(),
warnifnot(),
what_size()
Examples
# Check if library base is installed. If not, stop and show error
try_require("base", stop = TRUE)
# Check if library xxx is installed. If not, show warning
try_require("xxx", stop = FALSE)