# read in sample reservoir file
ff <- system.file("extdata","ReservoirStages.csv", package="RavenR")
rvn_res_read(ff) %>%
rvn_res_extract(subs="sub36", res=.) -> mystage
sim <- mystage$sim
obs <- mystage$obs
precip <- rvn_res_read(ff)$res$precip
# create a nice reservoir stage plot
rvn_res_plot(sim,obs)
# create a reservoir stage plot with precip as well
rvn_res_plot(sim,obs,precip=precip)
# create a reservoir stage plot with precip as well for a specific subperiod
prd <- "2003-10-01/2005-10-01"
rvn_res_plot(sim,obs,precip=precip,prd=prd)
# add winter shading
rvn_res_plot(sim,obs,precip=precip, winter_shading=TRUE)
Run the code above in your browser using DataLab