Learn R Programming

lares (version 5.1.0)

try_require: Check if Specific Package is Installed

Description

This function checks library dependencies

Usage

try_require(package, stop = TRUE)

Arguments

package

Character. Name of the library

stop

Boolean. Stop if not installed. If FALSE and library is not available, warning will be shown.

Value

No return value, called for side effects.

See Also

Other Tools: autoline(), bind_files(), bring_api(), db_download(), db_upload(), export_plot(), export_results(), get_credentials(), h2o_predict_API(), h2o_predict_MOJO(), h2o_predict_binary(), h2o_predict_model(), h2o_selectmodel(), haveInternet(), image_metadata(), importxlsx(), ip_data(), json2vector(), listfiles(), mail_send(), msplit(), myip(), quiet(), read.file(), statusbar(), tic(), updateLares(), zerovar()

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab