#' @useDynLib reems
#' @import Rcpp 
#' @import raster sf sp
#' @import graphics grDevices
#' @importFrom stats lm na.omit
#' @importFrom utils read.table write.table capture.output
NULL

load.required.package <- function(package, required.by) {
  if (!requireNamespace(package, quietly = TRUE)) {
    stop(paste0(
      "'", required.by, "' requires the '", package, "' package. ",
      "Please install '", package, "' first."
    ))
  } else {
    message(paste0("Loading ", package, " (required by ", required.by, ")"))
  }
}

