rvn_apply_wyearly_which_max_xts: which.max over water year periods

View source: R/rvn_utilities.R

rvn_apply_wyearly_which_max_xtsR Documentation

which.max over water year periods

Description

Applies the which.max function within each water year period, and returns the corresponding max values and dates in an xts format.

Usage

rvn_apply_wyearly_which_max_xts(x, mm = 9, dd = 30)

Arguments

x

xts object

mm

month of water year ending (default 9)

dd

day of water year (default 30)

Value

xts object with max values and corresponding dates

Examples

data(rvn_hydrograph_data)

# obtain peak observed flows in each water year period
rvn_apply_wyearly_which_max_xts(rvn_hydrograph_data$hyd$Sub43_obs)

# will return a warning with no result if multiple columns supplied
rvn_apply_wyearly_which_max_xts(rvn_hydrograph_data$hyd)


rchlumsk/RavenR documentation built on Nov. 4, 2022, 2:01 a.m.