visFDCtrend: Visualization of Kendall's Tau Trend Test throughout the...

Description Usage Arguments Value Author(s) See Also Examples

Description

Draw plots of the Kendall's tau trend test of the annual daily-flow-duration curves housed in the environment from fill_tfdcenv. Calendar year is the basis as provided by the fdctrend, which is the real algorithm deployment. Some have referred to the visualization as the “Quantile-Kendall plot.”

Usage

1
2
3
visFDCtrend(fdcenv=NULL, file=NA, alpha=0.05, fast=FALSE, site=NA,
                         notitle=FALSE, showflowregime=TRUE,
                         width=7, height=5, ...)

Arguments

fdcenv

An R environment previously populated by fill_tfdcenv that in turn dispatches to fdctrend. This argument can also be a data.frame if a single site is desired (see Examples);

file

An optional file name for a portable document format graphics file;

alpha

The statistical significance (two-tailed), it will be divided in two when the large sample approximation for Kendall's tau is needed. Otherwise is it is used as is for comparison to the p-value from the cor.test() function built-in to R that had already been called by fdctrend via fill_tfdcenv;

fast

A logical controlling whether the progressively lengthening data.frame of the return is created. This data.frame can be really CPU heavy and potentially unneeded by many users. If set, just "fast option used" will be returned. With either setting, all graphics proceed the same;

site

A possible optional string for the site number or other information to annotate on the graphic and used as the site identifier in the returned data.frame otherwise just plain-old “site” is used. Finally, this site is only picked up if the fdcenv was a data.frame and the site is not missing;

notitle

A logical to trigger the title of the plot that is constructed internally from the site and other information such as year interval and number of years of record represented in the plot;

showflowregime

A logical to trigger annotation about where the low-flow, median, and high-flow regimes reside on the plot;

width

The width of the portable document format graphics device that matches the width of the pdf() function;

height

The height of the portable document format graphics device that matches the height of the pdf() function; and

...

Additional arguments to pass to the par() function built-in to R that is called internally.

Value

An R data.frame of all the annual daily-flow-duration curve tables from the tfdcenv with columns:

site

The site identification;

count

The sample size as determined by the number of year columns stemming from fdctrend;

prob

The nonexceedance probability into the annual daily-flow-duration curve;

estimate

The estimate of Kendall's tau from the cor.test function; and

p.value

The p-value from the cor.test() function for method="kendall".

Author(s)

W.H. Asquith

See Also

fill_tfdcenv, fdctrend

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# See Examples under fill_tfdcenv() and elsewhere in this documentation.

DV <- new.env()
sites <- c("08093100","08093500")
fill_dvenv(sites, envir=DV, edate="2016-09-30")
TFDC <- new.env()
n <- fill_tfdcenv(dvenv=DV, envir=TFDC) # number fdctrend() processed
AllFDCtrend <- visFDCtrend(TFDC$"08093500") # one plot is shown
AllFDCtrend <- visFDCtrend(TFDC$"08093500", site="") # no labeling
AllFDCtrend <- visFDCtrend(TFDC) # both plots are shown 

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