R/is_wepp_available.R

Defines functions is_wepp_available

Documented in is_wepp_available

#' Will check for WEPP executable
#'
#' @return if WEPP executable is in the path, returns TRUE otherwise returns FALSE
#'
is_wepp_available <- function() {
  if (!is_linux()) {
    message("WEPP only available on Linux OS")
    return(FALSE)
  }

  path <- Sys.which("wepp")

  if (nchar(path) > 0) {
    return(TRUE)
  } else {
    return(FALSE)
  }
}
jarad/WEPPR documentation built on Nov. 3, 2023, 5:42 a.m.