R/package_availability.R

Defines functions package_availability

## Function to check the availability of dependencies within functions
package_availability <- function(pkg = "plyr"){
  # pkg = package name

  if(! requireNamespace(pkg, quietly = TRUE)){
    stop("Package ", pkg, " is not available. Please install it with:  install.packages('", pkg, "')", sep="")
  }

}
vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.