total.precip.op.threshold: Sum of precipitation above a threshold

Description Usage Arguments Details Value See Also Examples

View source: R/climdex.r

Description

This function returns the sum of values above a threshold for each period (as defined by date.factor).

Usage

1
total.precip.op.threshold(daily.prec, date.factor, threshold, op)

Arguments

daily.prec

Data to compute index on.

date.factor

Date factor to split by.

threshold

The threshold to compare to.

op

The operator to use to compare data to threshold.

Details

This routine sums up all values which exceed or are below (depending on op) the given threshold.

Value

A timeseries of sums of numbers above the threshold for each period.

See Also

climdex.r99ptot.

Examples

1
2
3
4
5
prec.dat <- c(0.1, 3.0, 4.3, 1.9, 1.3, 6.0, 0, 0, 4.0, 1)
phony.date.factor <- factor(rep(1:2, each=5))

## Compute equiv of PRCPTOT
prec.sum <- total.precip.op.threshold(prec.dat, phony.date.factor, 1, ">=")

Example output

Loading required package: PCICt

climdex.pcic documentation built on March 26, 2020, 7:17 p.m.