calc_allHIT | R Documentation |
Function to calculate all 171 biologically relevant hydrologic indice statistics described in the USGS Hydrologic Index Tool
calc_allHIT(
x,
yearType = "water",
wyMonth = 10L,
stats = "all",
digits = 3,
pref = "mean",
drainArea = NULL,
floodThreshold = NULL
)
x |
A dataframe containing a vector of date values in the first column and vector of numeric flow values in the second column. |
yearType |
A character of either "water" or "calendar" indicating whether to use water years or calendar years, respectively. |
wyMonth |
A numeric. The month of the year in which the water year starts (1=January, 12=December). The water year begins on the first day of wyMonth. |
stats |
Character vector statistic groups. Choices are "all","calc_magAverage", "calc_magLow", "calc_magHigh", "calc_frequencyLow", "calc_frequencyHigh", "calc_durationLow", "calc_durationHigh", "calc_timingAverage", "calc_timingLow", "calc_timingHigh", "calc_rateChange" |
digits |
A numeric. Number of digits to round indice values |
pref |
A character of either "mean" or "median", indicating whether to use mean or median. See details. |
drainArea |
Numeric drainage area. Only required for some statistics. Typically units of square miles, see details of specific statistics for more. |
floodThreshold |
Numeric flood threshold as the flow equivalent for a flood recurrence of 1.67 years |
This function is a wrapper for the lower level functions to calculate groups of indice statistics.
Desired groups of indices can be specified using the stats
argument.
Different arguments are required depending on indices selected and are described below.
Detailed descriptions of the indices and pref
argument behavior are provided in the documentation for individual indice group functions
calc_magAverage Indices describing magnitude of the average flow condition. drainArea
argument must be specified for the ma41 statistic.
calc_magLow Indices describing magnitude of the low flow condition. drainArea
argument must be specified for the ml22 statistic.
calc_magHigh Indices describing magnitude of the peak flow condition. drainAre
argument must be specified for the mh20 statistic.
calc_frequencyLow Indices describing frequency of low flow events. No additional arguments required.
calc_frequencyHigh Indices describing frequency of high flow events. No additional arguments required.
calc_durationLow Indices describing duration of low flow events. No additional arguments required.
calc_durationHigh Indices describing duration of high flow events. floodThreshold needs to be supplied. See calc_durationHigh
.
calc_timingAverage Indices describing timing of average flow events. No additional arguments required.
calc_timingLow Indices describing timing of low flow events. No additional arguments required.
calc_timingHigh Indices describing timing of high flow events. No additional arguments required.
calc_rateChange Indices describing rate of change of flow. No additional arguments required.
x <- sampleData[c("date","discharge")]
calc_allHIT(x=x,yearType="water",stats="all",pref="mean",drainArea=50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.