R/spi.R

Defines functions spi spi

Documented in spi

spi <- function(x, y, ...) UseMethod("spi")



#' @rdname Drought-indices
#' @export
#'
spi <- function(data, scale, kernel = list(type = "rectangular", shift = 0),
                distribution = "Gamma", fit = "ub-pwm", na.rm = FALSE,
                ref.start = NULL, ref.end = NULL, keep.x = FALSE, params = NULL, verbose = TRUE, ...) {
  # input checks

  sol <- spei(
    data, scale, kernel, distribution, fit, na.rm,
    ref.start, ref.end, keep.x, params, verbose
  )
  sol$call <- match.call(expand.dots = FALSE)

  return(sol)
}

Try the SPEI package in your browser

Any scripts or data that you put into this service are public.

SPEI documentation built on March 7, 2023, 5:15 p.m.