group1: group1

group1R Documentation

group1

Description

Magnitude of monthly water conditions

Usage

group1(x, yearType = c("water", "calendar"), FUN = stats::median)

Arguments

x

A zoo timeseries object containing the flow series

yearType

The type of year factor to be used when determining statistcs, yr = 'water' or yr ='calendar' for water years and calculated years respectively

FUN

the function to be applied to the monthly values. Median is the default here. This can be a character string of a function name but should ideally be a closure

Details

Calculates the IHA parameter group 1: Magnitude of montly water conditions group1() applies an input function FUN to a 1-D zoo x, grouping by water month+water year or calendar month+calendar year depending on user input See IHA documentation: http://www.nature.org/initiatives/freshwater/conservationtools/art17004.html

Value

A matrix with the monthly results of FUN over each year

Author(s)

jason.e.law@gmail.com (imported to Hydrotools by Connor Brogan,connor.brogan@deq.virginia.gov)

References

http://www.nature.org/initiatives/freshwater/conservationtools/art17004.html

Examples

# #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 1 to get the minimum monthly flows:
# hydrotools::group1(flows_zoo,"water",FUN = min)

HARPgroup/hydro-tools documentation built on July 4, 2025, 11:05 a.m.