annualExtremes function

Calculate annual extreme flows.

Calculate annual extreme flows.

Calculates annual extreme events for all years in the series. By default, the function finds annual extreme discharge in streamflow object, but any matrix or data.frame may be used.

annualExtremes(x,data.col=NULL, year.col=NULL, moving.avg=FALSE)

Arguments

  • x: Object from which to extract extremes. Should be of class streamflow or data.frame or matrix.
  • data.col: Optional. If input is a matrix or data.frame, specifies which column contains the data.
  • year.col: Optional. If input is a matrix or data.frame, specifies which column contains the year.
  • moving.avg: Logical; defaults to FALSE. Can be specified TRUE to use 7-day moving average discharge when input is of class "streamflow".

Returns

A list with items - annual.max: Matrix giving maximum flow for each year in series. Each row contains the maximum values and all corresponding variables from that observation.

  • annual.min: Matrix giving minimum flow for each year in series. Each row contains the minimum values and all corresponding variables from that observation.

Examples

data(sycamore) sycamore.flows<-asStreamflow(sycamore,river.name="Sycamore Creek") syc.extremes<-annualExtremes(sycamore.flows) names(syc.extremes) syc.extremes$annual.max[1:3,]
  • Maintainer: Samarth Shah
  • License: GPL-3
  • Last published: 2019-03-08

Useful links