R/spi.R

Defines functions spi spi

Documented in spi

# Computation of the Standardized Precipitation Index (SPI).
#

# Generic function
spi <- function(x, y,...) UseMethod('spi')

# Fit SPI (previously spi() function). Default method.
spi <-
function(data, scale, kernel=list(type='rectangular',shift=0),
	distribution='Gamma', fit='ub-pwm', na.rm=FALSE,
	ref.start=NULL, ref.end=NULL, x=FALSE, params=NULL, ...)
{
	sol <- spei(data, scale, kernel, distribution, fit, na.rm,
		ref.start, ref.end, x, params)
	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 May 2, 2019, 11:05 a.m.