Learn R Programming

EcoHydRology (version 0.4.3)

hydrograph: Plot a hydrograph

Description

Creates a hydrograph with one or two streamflow data sets, and can include a precipitation hyetograph.

Usage

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 = P.units, S1.col = "black", S2.col = "red", stream.label = paste("Streamflow ", S.units))

Arguments

input
This is a data frame with at least two columns of data First column: Must be a time series Second column: If including precip, precip. Otherwise, streamflow - AND do not include any other columns Third column: (Only if precip not included) First s
streamflow
vector of streamflow values - not necessary if using "input"
timeSeries
vector of time series 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)
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

Warning

This function does not allow NA values. Remove rows with NA values before running.

Examples

Run this code
data(OwascoInlet)
head(OwascoInlet)
hydrograph(OwascoInlet)

Run the code above in your browser using DataLab