Learn R Programming

lfstat (version 0.9.4)

summary.deficit: Object Summaries

Description

Summarizes an object of class deficit. For every drought event the start, end as well as the drought volume and duration is listed.

Usage

"summary"(object, drop_minor = c(volume = "0.5%", duration = 5), ...)

Arguments

object
an object of class deficit, as produced by find_droughts.
drop_minor
a vector of length one or two, determining the filtering of minor droughts. If drop_minor is of length one and its value is zero, no filtering is applied. Also a numeric of character vector of length two with the named elements volume and duration is accepted. If a value contains the percentage (%) sign this percentage of the maximum duration or volume is used a the filter criterion.
...
currently ignored.

Value

a data.frame where each row corresponds to an event. There are summarizing columns

Examples

Run this code
data(ray)
ray <- as.xts(ray)["1970::1970", ]
r <- find_droughts(ray, threshold = 0.02)
summary(r)      # minor events got filtered

summary(r, drop_minor = 0)      # no filtering
summary(r, drop_minor = c("volume" = 10000, "duration" = 5))
summary(r, drop_minor = c("volume" = "10%", "duration" = 5))

Run the code above in your browser using DataLab