Learn R Programming

precintcon (version 2.3.0)

spi.per.year: Standardized Precipitation Index

Description

Calculates the Standardized Precipitation Index (SPI) per year on a daily or monthly precipitation serie.

Usage

spi.per.year(object, period = 3, distribution = "Gamma", FUN = mean)

Arguments

object
a daily or monthly precipitation serie.
period
the number of months to be aggregate in the calculation of the standardized precipitation index. (Default value: 3)
distribution
(it has no effect yet).
FUN
the function used to summarize the standardized precipitation index per year. (Default function: mean).

Value

A data.frame (precintcon.spi.per.year) containing the following variables:
  • year is the year.
  • spi is the standardized precipitation index.

See Also

spi read.data

Examples

Run this code
##
# Loading the monthly precipitation serie.
data(monthly)

##
# Performing the Standardized Precipitation Index
spi.per.year(monthly, period = 3)

Run the code above in your browser using DataLab