View source: R/cumulativeDischargePlot.R
cumulativeDischargePlot | R Documentation |
Creates a ggplot object of annual cumulative flows from a data frame of CRHM output and/or WSC daily flows. The WSC flows are obtained from the tidyhydat package. The WSC data is truncated so that it only includes the range of the CRHM data. If more than a single year of data is specified, then the plot will be faceted by year.
cumulativeDischargePlot(
CRHMflows = NULL,
CRHMflowsLabel = "",
CRHMflowCol = 1,
WSCdailyFlowsID = NULL,
WSCdailyFlowsLabel = "",
facetCols = 3,
quiet = TRUE,
hydat_path = NULL
)
CRHMflows |
Optional. Optional. A data frame of CRHM modelled flows. The flows must
be in m |
CRHMflowsLabel |
Optional. Labels for the CRHM data. If not specified, and CRHM data are plotted, then the name of the CRHM variable will be used. |
CRHMflowCol |
Optional. Column containing the flowrates, not including the datetime. Default is 1. |
WSCdailyFlowsID |
Optional. If |
WSCdailyFlowsLabel |
Optional. Labels for the daily flows. If not specified, then the WSC station number will be used, followed by daily. |
facetCols |
Optional. Number of columns to wrap the facets (if they are used). Setting a value less than 1 will cause an error. |
quiet |
Optional. Suppresses display of messages, except for errors. If you are calling
this function in an R script, you will usually leave |
hydat_path |
Optional. Path to the HYDAT database. This can usually be left blank. |
If successful, returns a ggplot2 object containing the cumulative discharge
plot. If unsuccessful, the value FALSE
will be returned.
Kevin Shook
hydrograph
## Not run:
p <- cumulativeDischargePlot(CRHMflows = crhm_output, WSCdailyFlowsID = "05FA025",
facetCols=2, quiet=FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.