akq_scibase: Asquith-Knight Discharge Decay Analyses Converted to...

Description Usage Arguments Value Author(s) See Also Examples

Description

Extract all of the various results of Asquith–Knight discharge decay analyses and write these into parallel named plain-text output files. This function is a wrapper on calls to akq_write for the tables extracted by akq_counts, akq_lmom, akq_lmom_year, akq_lmom_decade, akq_summary, and akq_table (optional) utility functions. ScienceBase is a contemporaneous (c.2017) distribution mechanism for certain USGS datasets.

Usage

1
2
3
4
5
akq_scibase(akqenv, basename="SciBase_", extension=".txt",
                    dotable=FALSE, doyearlmr=FALSE, dodecadelmr=FALSE,
                    rm.gfactor=TRUE, rm.L1L2=TRUE,
                    is.nochange.env=FALSE, site2site_no=FALSE,
                    silent=FALSE, ...)

Arguments

akqenv

The R environment previously populated by fill_akqenv. This can also be an R list directly from akqdecay; special accommodation is made;

basename

The leading component of the output file names;

extension

The extension to append to the output file names;

dotable

Should akq_table also be called—this can be CPU and file system intensive;

doyearlmr

Should the call to akq_lmom dumping the yearly L-moments and Gfactors be made—this can be CPU and file system intensive;

dodecadelmr

Should the call to akq_lmom dumping the decadal L-moments and Gfactors be made—this will be 10 times less CPU and file system intensive than if doyearlmr is set. Try turning this one (dodecadelmr) on first;

rm.gfactor

Remove the gfactor column as applicable. This is the default as it is arguable that the decision to use a parametric distribution model is interpretive;

rm.L1L2

Remove the L1L2 column as applicable. This is the default because of the additional burden of describing why the product of λ_1λ_2 is being tendered—the general reasoning was that it was a simply to explain distribution-free measure of a depth into the right tail;

is.nochange.env

The “no change” conditions have many columns as Inf and NA throughout but have these because akqdecay constructs parallel output with the other two change definitions (increasing and decreasing). This logical causes these columns to be dropped, but the function does not rely on knowing this automatically and hence the argument here;

site2site_no

For design reasons, the package uses a site as the leading column identifying a site, but likely for a Science Base release, the conventional idea of streamgage were used and not some special marking mechanism. This logical triggers the leading column of site to be renamed to site_no as a matter of likely convenience;

silent

Suppress informative calls to message(); and

...

Additional arguments to pass to control akq_write.

Value

This function has no returned value and is intended for its side effects.

Author(s)

W.H. Asquith

See Also

akq_write

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Not run: 
akq_scibase(akqdecay(dvget("08167000"), site="08167000"), dotable=TRUE)
#  Count extraction ...
# writing /Users/wasquith/SciBase_counts.txt
#      site            total_count      decreases       increases      nochanges   
#  Length:1           Min.   :29580   Min.   :18307   Min.   :7677   Min.   :3247  
#  Class :character   1st Qu.:29580   1st Qu.:18307   1st Qu.:7677   1st Qu.:3247  
#  Mode  :character   Median :29580   Median :18307   Median :7677   Median :3247  
#                     Mean   :29580   Mean   :18307   Mean   :7677   Mean   :3247  
#                     3rd Qu.:29580   3rd Qu.:18307   3rd Qu.:7677   3rd Qu.:3247  
#                     Max.   :29580   Max.   :18307   Max.   :7677   Max.   :3247  
#       NAs       rawDV_zeros    rawDV_NAs delDates_ne_lag
#  Min.   :349   Min.   :332   Min.   :0   Min.   :2      
#  1st Qu.:349   1st Qu.:332   1st Qu.:0   1st Qu.:2      
#  Median :349   Median :332   Median :0   Median :2      
#  Mean   :349   Mean   :332   Mean   :0   Mean   :2      
#  3rd Qu.:349   3rd Qu.:332   3rd Qu.:0   3rd Qu.:2      
#  Max.   :349   Max.   :332   Max.   :0   Max.   :2      
#   L-moment extraction ...
# writing /Users/wasquith/SciBase_lmompor.txt
#   Summary extraction ...
# writing /Users/wasquith/SciBase_summary.txt
#   Table extraction ...
# writing /Users/wasquith/SciBase_table.txt #
## End(Not run)

## Not run: 
sites <- c("05403500", "05405000") # Two streamgages in Wisconsin
WisExample <- new.env(); fill_dvenv( sites,              envir=WisExample,
                                     sdate="1945-01-01", edate="2014-12-31")
WisAKQ <- new.env(); fill_akqenv(dvenv=WisExample, envir=WisAKQ)
akq_scibase(WisAKQ) #
## End(Not run)

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