fill_mnenv: Fill an R Environment with Monthly Streamflow by Streamgage

Description Usage Arguments Value Author(s) See Also Examples

Description

Fill an R environment with R data.frames of monthly streamflow for USGS streamgages. This function is a wrapper (abstraction layer) on the mnget function. Users interested in monthly values might be especially interested in the monthly computations based on the daily streamflows but with the inclusion of separated streamflow in dvpart and fill_dvpartenv (see Examples in dvpart for a demonstration).

Usage

1
2
3
fill_mnenv(siteNumbers, envir=NULL,  sdates=NULL,  edates=NULL,
                                    flowlos=NULL, flowhis=NULL,
                        silent=FALSE, ...)

Arguments

siteNumbers

A vector of USGS streamgage identification numbers;

envir

The R environment to use and required to be user created by new.env();

sdates

A vector of starting dates (possibly unique by streamgage) to feed the similarly named argument of mnget with string format of “YYYY-MM” for year (YYYY) and month (MM) respectively padded by zeros as needed. Use "" for earliest date, and for convenience, a vector of length 1 (unity) is recycled to form a vector with as many elements as length if siteNumbers;

edates

A vector of ending dates (possibly unique by streamgage) to feed the similarly named argument of mnget with string format of “YYYY-MM” for year (YYYY) and month (MM) respectively padded by zeros as needed. Use "" for latest date, and for convenience, a vector of length 1 (unity) is recycled to form a vector with as many elements as length if siteNumbers;

flowlos

A vector of lower streamflow thresholds (likely unique by streamgage) to feed the similar named argument of mnget;

flowhis

A vector of upper streamflow thresholds (likely unique by streamgage) to feed the similar named argument of mnget;

silent

Suppress informative calls to message(); and

...

Additional arguments to pass to control mnget.

Value

An R environment is returned.

Author(s)

W.H. Asquith

See Also

mnget

Examples

1
2
3
4
5
6
7
## Not run: 
# Six USGS streamgages of the Wolf River in Tennessee
wolfriver <- c("07030392", "07030500", "07031650",
               "07031660", "07031700", "07031740")
wolf.env <- new.env() # the standard declaration of an environment
fill_mnenv(wolfriver, envir=wolf.env) # wolf.env now filled with six tables.#
## End(Not run)

wasquith-usgs/akqdecay documentation built on Nov. 9, 2020, 1:13 p.m.