Description Usage Arguments Value Author(s) See Also Examples
Extract and combine the counts from various yearly or decadal L-moment tables between the three computation methods of Asquith–Knight discharge decay analyses and compute relative percentages. A check is made internally that the ordering of the arguments DECR
, INCR
, and NC
looks proper—meaning that total summation (all sites and year/decade) of \checkΨ (decreasing) are larger than total summation of \hatΨ and larger than total summation of \ddotΨ, and total summation of \hatΨ is larger than total summation of \ddotΨ. This check is made because the number of decreases is almost uniformly about twice as often as increases and both those are larger than the number of no changes. Mathematically, for indicator function \mathbf{1}(x_i) for the presence of the ith value in the sample, the relations among the Ψ are
∑_{i=1}^n \mathbf{1}(\checkΨ_i) ≥ ∑_{i=1}^n \mathbf{1}(\hatΨ_i) ≥ ∑_{i=1}^n \mathbf{1}(\ddotΨ_i)\mbox{.}
1 | countLMdfs(DECR, INCR, NC, silent=FALSE, ...)
|
DECR |
A |
INCR |
An |
NC |
An |
silent |
Suppress informative calls to |
... |
Additional arguments to pass (see source code to ascertain flexible usage). |
An R data.frame
is returned having attributes (attr()
function) of skipped_sites
and which
(year or decade) and contains
site |
The streamgage identification number; |
year/decade |
The type of aggregation; |
total_count_minusNAs |
The total number of daily-mean streamflow values. However, the counts of the |
decreases |
The number of decreases (\checkΨ) during the year or decade; |
increases |
The number of increases (\hatΨ) during the year or decade; |
nochanges |
The number of no changes (\ddotΨ) during the year or decade; |
pct_decreases |
Percent of decreases relative to |
pct_increases |
Percent of increases relative to |
pct_nochanges |
Percent of no changes relative to |
W.H. Asquith
akq_lmom_year
, akq_lmom_decade
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 | ## Not run:
# Suppose LDd [decreasing], LDi [increasing], LDnc [nochange] are from
# LDd <- akq_lmom_decade(AKd); LDi <- akq_lmom_decade(AKi); LDnc <- akq_lmom_decade(AKnc)
# for which AKd, AKi, and AKnc are from fill_akqenv(..., method="decreasing") etc...
DIN <- countLMdfs(LDd, LDi, LDnc) # *** Here is the example operation. ***
# Here follows the function's response via message() during some testing.
#countLMdfs: remember that counts of NAs (record gaps or zero flows) are not included.
# Totals: decreases=10971798, increases=5627551, and nochanges=1976068 and data.frame
# argument ordering seems consistent.
par(las=1, xaxs="i", yaxs="i")
plot(jitter(DIN$decade, factor=2), DIN$pct_decreases, cex=0.6, tcl=0.5,
xlim=c(1880,2020), ylim=c(0,100), col="#FB6A4A", lwd=0.5,
xlab="DECADE", ylab="FRACTION OF TIME")
points(jitter(DIN$decade, factor=2), DIN$pct_increases, cex=0.6, col="#6BAED6", lwd=0.5)
points(jitter(DIN$decade, factor=2), DIN$pct_nochanges, cex=0.6, col="#74C476", lwd=0.5)
tmp <- DIN[complete.cases(DIN),]
lines(lowess(tmp$decade, tmp$pct_decreases), col="#A50F15", lwd=2)
lines(lowess(tmp$decade, tmp$pct_increases), col="#08519C", lwd=2)
lines(lowess(tmp$decade, tmp$pct_nochanges), col="#006D2C", lwd=2)
# This example uses jitter() because likey enormous overlap of points for a given
# decade will occur. The lowess() lines are drawn to help visualize the pattern.
# A common pattern seen in exploratory analysis is a systematic decrease in no changes
# from the earliest days of the USGS streamgaging to modern times. Ramifications of this
# are not fully understood (noted March 30, 2017, wha/rrk).
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.