spi.per.year: Standardized Precipitation Index

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
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:

Author(s)

Lucas Venezian Povoa lucasvenez@gmail.com

See Also

spi read.data

Examples

1
2
3
4
5
6
7
##
# Loading the monthly precipitation serie.
data(monthly)

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

Example output

Loading required package: ggplot2
Loading required package: scales

Attaching package: 'precintcon'

The following object is masked from 'package:ggplot2':

    stat

   year       spi.FUN
1  1950 -0.3179992148
2  1951  0.6273567697
3  1952 -0.2017762673
4  1953 -0.1238411014
5  1954 -1.2765934267
6  1955  0.0901489810
7  1956 -0.4167530359
8  1957  0.7780745028
9  1958  0.3421297686
10 1959  0.4540225889
11 1960  0.0006250237
12 1961  0.6565109727
13 1962 -1.0422044499
14 1963 -0.5629358449
15 1964 -0.8303102920
16 1965  0.7264734459
17 1966 -0.5915979152
18 1967  0.6464879565
19 1968 -0.2402115912
20 1969  0.6566482629
21 1970 -0.4078722281
22 1971 -0.6247152225
23 1972  0.0106816536
24 1973  0.9748025607
25 1974  0.3829762691
26 1975 -0.1194834035
27 1976 -0.1450318484
28 1977 -0.9738407828
29 1978 -0.8234493681
30 1979  0.5355668280
31 1980 -0.0718160868
32 1981 -0.5332973712
33 1982 -0.5197824087
34 1983  0.8228204778
35 1984  0.4340655657
36 1985  0.1331748413
37 1986 -0.3162475965
38 1987  0.6015227412
39 1988  0.0510939405
40 1989  0.1390827705
41 1990  0.3247643665
42 1991  0.4909672291
43 1992  0.2296568674

precintcon documentation built on May 2, 2019, 3:07 p.m.