R/package_loader.R

# You need the suggested package for this function
safeLoadPkg <- function(pkg) {
    if (!requireNamespace(pkg, quietly = TRUE)) {
        stop("The package ", pkg, " is needed for this function to work. Please install it.",
             call. = FALSE)
    }
}
graggsd/sgrpipe documentation built on May 14, 2019, 9:36 p.m.