# read in hydrograph sample csv data from RavenR package
ff <- system.file("extdata","run1_Hydrographs.csv", package="RavenR")
# read in Raven Hydrographs file, store into myhyd
myhyd <- rvn_hyd_read(ff)
# no plot or observed data, specified period
flow_36 <- rvn_hyd_extract(subs="Sub36",myhyd)
attributes(flow_36)
# extract simulated and observed flows
sim <- flow_36$sim
obs <- flow_36$obs
# extract precipitation forcings
myprecip <- rvn_hyd_extract(subs="precip",hyd=myhyd)
myprecip <- myprecip$sim
# plot all components using rvn_hyd_plot
rvn_hyd_plot(sim,obs,precip=myprecip)
Run the code above in your browser using DataLab