tableFlowChange: Prints table of change metrics for a given streamflow...

View source: R/tableFlowChange.R

tableFlowChangeR Documentation

Prints table of change metrics for a given streamflow statistic

Description

Part of the flowHistory system. Provides a measure of change (in real units and as percent per year) based on the smoothed values for various streamflow statistics. Smoothing algorithm is the same as is used in plotFlowSingle.

Usage

tableFlowChange(eList, istat, qUnit = 1, runoff = FALSE, yearPoints = NA)

Arguments

eList

named list with at least Daily and INFO dataframes

istat

A numeric value for the flow statistic to be graphed (possible values are 1 through 8)

qUnit

object of qUnit class printqUnitCheatSheet, or numeric represented the short code, or character representing the descriptive name.

runoff

logical variable, if TRUE the streamflow data are converted to runoff values in mm/day

yearPoints

A vector of numeric values, specifying the years at which change metrics are to be calculated, default is NA (which allows the function to set these automatically), yearPoints must be in ascending order

Details

The index of the flow statistics is istat. These statistics are: (1) 1-day minimum, (2) 7-day minimum, (3) 30-day minimum, (4) median (5) mean, (6) 30-day maximum, (7) 7-day maximum, and (8) 1-day maximum.

Can also run the statistics on any Period of Analysis (individual months or sequence of months) using setPA.

A dataframe is returned, as well as a printout in the R console.

Examples

eList <- Choptank_eList
tableFlowChange(eList, istat = 5, yearPoints = c(1981, 1995, 2010))
eList <- setPA(eList, paStart = 4, paLong = 12)
tableFlowChange(eList, istat = 2, qUnit = 2, yearPoints = c(1981, 1995, 2010))
eList <- setPA(eList, paStart = 9, paLong = 1)
df <- tableFlowChange(eList, istat = 5, qUnit = 2, yearPoints = c(1981, 1995, 2010))
df 

USGS-R/EGRET documentation built on Feb. 9, 2024, 5:30 p.m.