allstats2 function

Calculate all characteristic stats for a site

Calculate all characteristic stats for a site

Calculates all parameters at once for a single data file. The output gives numerical results from the functions annualnoise, fourierAnalysis, lp3Events,sigmaHighFlows, and sigmaLowFlows.

allstats(file.name, river.name, file.type="txt", date.col=3, discharge.col=4, skipped.rows=28)

Arguments

  • file.name: Character string of the form "file.txt" or "file.csv".
  • river.name: Character string specifying river name.
  • 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.
  • discharge.col: Numeric specifying column containing discharge data. Defaults to 4.
  • skipped.rows: Numeric indicating number of rows to skip at beginning of file.

Returns

A data frame with 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 likely work best.

Examples

# allstats function works on 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 this river allstats(f,river.name="sycamore", date.col = 2, discharge.col = 3, skipped.rows = 1)

See Also

parameters.list

  • Maintainer: Samarth Shah
  • License: GPL-3
  • Last published: 2019-03-08

Useful links