hydrograph {EcoHydRology} | R Documentation |
Creates a hydrograph with one or two streamflow data sets, and can include a precipitation hyetograph.
hydrograph(input = matrix(ncol = 2, nrow = 2), streamflow = input[, 2], timeSeries = input[, 1], streamflow2 = NULL, precip = NULL, begin = 1, endindex = length(streamflow), P.units = "", S.units = "", S1.col = "black", S2.col = "red", stream.label = "Streamflow", streamflow3 = NULL, streamflow4 = NULL, precip2 = NULL)
input |
This is a data frame with at least two columns of data First column: Must be a time/date series Second column: If including precip, precip. Otherwise, streamflow - AND do not include any other columns Third column: (Only include if precip is in the second column) First streamflow dataset Forth column: (optional) Second streamflow dataset |
streamflow |
vector of streamflow values - not necessary if using "input" |
timeSeries |
vector of time or date values - not necessary if using "input" |
streamflow2 |
optional vector of streamflow values - not necessary if using "input" |
precip |
vector of precipitation values - not necessary if using "input" |
begin |
If you don't want to graph the whole data set, include the index where you would like to start |
endindex |
If you don't want to graph the whole dataset, include the index where you would like to end |
P.units |
Precipitation units (character) |
S.units |
Streamflow units (character). Users who have volumetric flow will have the superscript correctly formatted if they enter "m3s" or "ft3s" |
S1.col |
color of the line representing streamflow |
S2.col |
color of the line representing second streamflow data |
stream.label |
character string - Label for vertical axis |
streamflow3 |
optional vector of additional streamflow values |
streamflow4 |
optional vector of additional streamflow values |
precip2 |
optional vector of a second precip gage data if you are interested in comparing precip inputs |
The date series should be continuous and evenly spaced. If not, the dates will not line up accurately on the x-axis.
This function can now take NA values. If you chose to use the input argument but are not including precipitation, input must only have two columns - you will need to add the second streamflow dataset using the "streamflow2" argument.
Josephine Archibald
data(OwascoInlet) head(OwascoInlet) hydrograph(OwascoInlet)