dvpartenv2mnpartenv: Convert an R Environment with Daily Streamflow Partitioning...

Description Usage Arguments Value Author(s) See Also Examples

Description

Converted processing from fill_dvpartenv to monthly aggregated streamflow stored in another R environment.

Usage

1
dvpartenv2mnpartenv(sites=NULL, dvpartenv=NULL, envir=NULL, silent=FALSE, ...)

Arguments

sites

An optional, likely partial, list of sites within dvenv for population into envir. This option means that a massive environment of daily values can be retained in the user's space but streamflow partitioning analyses can be restricted to a smaller subset of sites. If sites=NULL, then internally all of the sites within dvenv will be processed, and this would be almost universally the way to use this function;

dvpartenv

An R environment previously populated by fill_dvpartenv;

envir

A user created (usually) R environment by new.env();

silent

Suppress informative calls to message(); and

...

Additional arguments to pass to control akqdecay.

Value

This function is used for its side effects on the envir argument but does return a count of the sites processed by dvpart2mnpart.

Author(s)

W.H. Asquith

See Also

dvpart, dvpart2mnpart

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# See fill_dvenv() Examples for the creation of wolf.env used here.
# 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_dvenv(wolfriver, envir=wolf.env) # wolf.env now filled with six tables.

cdas <- sites_to_SpatialPointsDataFrame(wolfriver)$CDA

pdvwolf.env <- new.env() # the standard declaration of an environment
# Now, let us trigger the gap filler and the messages disappear.
fill_dvpartenv(dvenv=wolf.env, envir=pdvwolf.env, cdas=cdas, fillgaps=TRUE)

pmnwolf.env <- new.env()
dvpartenv2mnpartenv(dvpartenv=pdvwolf.env, envir=pmnwolf.env) # 
## End(Not run)

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