R/rvn_annual_quantiles.R
rvn_annual_quantiles.RdCalculate the quantiles for each day of the year based on the supplied time series.
rvn_annual_quantiles(
hgdata,
prd = NULL,
Qlower = 0.1,
Qupper = 0.9,
water_year = TRUE,
mm = 9
)Time series object of observed or simulated flows
time period for subset in character format "YYYY-MM-DD/YYYY-MM-DD"
Decimal percentage of lower quantile value (default 0.1)
Decimal percentage of upper quantile value (default 0.9)
boolean on whether to sort quantiles by water year start date (default TRUE)
month of water year ending (default 9)
Time series object of monthly median and quantile values
system.file("extdata","run1_Hydrographs.csv", package="RavenR") %>%
rvn_hyd_read(.) %>%
rvn_hyd_extract(subs="Sub36",.) ->
hyd_data
# Calculate quantiles for the simulated hydrograph
qdat <- rvn_annual_quantiles(hyd_data$sim)
head(qdat)
#> 10% 50% 90%
#> 2003-10-01 3.018155 4.327215 5.636275
#> 2003-10-02 3.590286 7.312070 11.033854
#> 2003-10-03 3.985922 9.075290 14.164658
#> 2003-10-04 3.716070 5.962030 8.207990
#> 2003-10-05 4.518400 4.583560 4.648720
#> 2003-10-06 4.303779 4.685735 5.067691