parameterslist: Calculate all characteristic stats from a list of files

Description Usage Arguments Value Note See Also Examples

Description

Function takes a vector of file names and returns seasonal signal-to-noise ratio, daily and annual noise color, 2- and 10-year return levels, and σ for high- and low-flow events.

All files in the vector should be of the same format.

Usage

1
parameters.list(x, names=NULL, file.type="txt", date.col=3, dis.col=4, skipped.rows=28) 

Arguments

x

Character vector containing file names.

names

Optional character vector with names of sites.

file.type

Character string, "txt" or "csv". Defaults to "txt".

date.col

Numeric specifying column containing date in "MM-DD-YYYY" format. Defaults to 3.

dis.col

Numeric specifying column containing discharge data. Defaults to 4.

skipped.rows

Numeric indicating number of rows to skip at beginning of file.

Value

A data frame with one row for each file and the following columns:

a.rms

Root mean squared amplitude.

n.rms

Root mean squared noise.

snr

Signal-to-noise ratio.

theta.d

Daily noise color.

theta.a

Annual noise color.

sigma.lf

Sigma for low flow events.

sigma.hf

Sigma for high flow events.

q2

2-year return level (flood).

q10

10-year return level (flood).

l2

2-year return level (drought).

l10

10-year return level (drought).

Note

The arguments "date.col", "discharge.col", and "skipped.rows" are designed to give some flexibility in file input; however, tab-delimited text without extra columns will work best.

See Also

allstats

Examples

1
2
3
4
5
6
7
8
# this function works on list of files
# read R data into temporary file handle
data(sycamore)
f = tempfile(fileext="txt")
write.table(sycamore, file=f, sep="\t")

# print all statistics for the list of rivers
parameters.list(c(f), names=c("sycamore"), date.col=2,dis.col=3,skipped.rows = 1)

discharge documentation built on May 2, 2019, 5:54 a.m.