Applies the which.max function within each water year period, and returns the corresponding max values and dates in an xts format.
rvn_apply_wyearly_which_max_xts(x, mm = 9, dd = 30)
xts object
month of water year ending (default 9)
day of water year (default 30)
xts object with max values and corresponding dates
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)
#> Sub43_obs
#> 2003-03-24 103
#> 2004-03-08 258
# will return a warning with no result if multiple columns supplied
rvn_apply_wyearly_which_max_xts(rvn_hydrograph_data$hyd)
#> Warning: x must be an xts object with one numeric column
#> [1] FALSE