group2 | R Documentation |
The group 2 statistics measure the magnitude of monthly water condition and include 12 parameters. This will calculate several metrics for each year of the 1-D zoo input x.
group2(x, yearType = c("water", "calendar"), mimic.tnc = T, ...)
x |
A zoo timeseries object containing the flow series |
yearType |
The type of year factor to be used when determining statistcs,
|
mimic.tnc |
should the function perform the calculation like the TNC IHA software? If mimic.tnc is TRUE, then running means will be calculated for each year individually and will not use data from the previous or next year, thereby |
... |
additional arguments passed to ddply. Likely not used without modificiation to this function |
This function divides the zoo by water or calendar year and finds the 1, 3, 7, 30, and 90 day rolling averages of the zoo. Then, it finds the range, base index, and days of zero flow of each year, with base index defined as the minimum 7-day flow divided by the average flow
a data frame with the group 2 statistics for each year
jason.e.law@gmail.com (imported to Hydrotools by Connor Brogan,connor.brogan@deq.virginia.gov)
http://www.conservationgateway.org/Files/Pages/indicators-hydrologic-altaspx47.aspx
# #Get data for NF Shenandoah Mount Jackson
# flows <- dataRetrieval::readNWISdv("01633000",parameterCd = "00060")
# flows <- dataRetrieval::renameNWISColumns(flows)
# #Convert flows to zoo
# flows_zoo <- zoo::as.zoo(x = flows$Flow)
# zoo::index(flows_zoo) <- flows$Date
# #Use group 2 to get critical period flows and stats:
# hydrotools::group2(flows_zoo,"water",mimic.tnc = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.