hydrograph: Plot a hydrograph

Description Usage Arguments Warning Note Author(s) Examples

Description

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

Usage

1
2
3
4
5
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)

Arguments

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

Warning

The date series should be continuous and evenly spaced. If not, the dates will not line up accurately on the x-axis.

Note

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.

Author(s)

Josephine Archibald

Examples

1
2
3

Example output

Loading required package: operators

Attaching package: 'operators'

The following objects are masked from 'package:base':

    options, strrep

Loading required package: topmodel
Loading required package: DEoptim
Loading required package: parallel

DEoptim package
Differential Evolution algorithm in R
Authors: D. Ardia, K. Mullen, B. Peterson and J. Ulrich

Loading required package: XML
        date  P_mm Streamflow_m3s baseflow_m3s Tmax_C Tmin_C
1 2009-04-22 4.318           3.77    0.0000000  17.78   3.89
2 2009-04-23 3.302           4.08    0.2943750  10.56   1.67
3 2009-04-24 0.254           3.65    0.5621719  10.00  -2.22
4 2009-04-25 0.000           3.23    0.7780090  24.44  -1.11
5 2009-04-26 0.000           2.97    0.9521583  30.56  11.11
6 2009-04-27 0.000           2.80    1.0971214  28.33  10.00

EcoHydRology documentation built on May 2, 2019, 8:28 a.m.