Skip to main content

pre_eval_require

Function pre_eval_require 

Source
fn pre_eval_require(
    args: &[Arg],
    env: &Environment,
    context: &BuiltinContext<'_>,
) -> Result<RValue, RError>
Expand description

Load a package if available, returning TRUE/FALSE.

Like library(), but returns FALSE instead of erroring if the package is not found. Accepts bare symbols: require(dplyr)

@param package name of the package to load @param quietly logical: suppress messages? @return logical: TRUE if loaded, FALSE otherwise