R/iam.R

#' IAM
#' @export
iam <- Vectorize(
  function(ppt, etp) {
    if (ppt < etp) {
      (ppt / etp) - 1
    } else {
      1 - (etp / ppt)
    }
  },
  vectorize.args = c("ppt", "etp")
)
italocegatta/forestr documentation built on May 18, 2019, 5:52 a.m.