ExtractFreq: Extract quantiles for use in a frequency distribution plot,...

View source: R/function_ExtractFreq.R

ExtractFreqR Documentation

Extract quantiles for use in a frequency distribution plot, e.g. a flow duration curve

Description

This function calculates quantiles suitable for duration curves of environmental time series data.

Usage

ExtractFreq(
  data,
  probs = c(0, 1e-05, 1e-04, 0.001, seq(0.01, 0.99, by = 0.01), 0.999, 0.9999, 0.99999,
    1)
)

Arguments

data

either a numeric vector or an all-numeric dataframe (NAs allowed) which holds the variables for which quantiles are computed.

probs

numeric, vector of probabilities as in quantile with default suitable for flow duration curves.

Details

ExtractFreq is a convenience wrapper function, it uses quantile to calculate the quantiles of one or more time series with a density appropriate for duration curves. NAs are allowed in the input data. For the results to be meaningful, input should represent equally-spaced time series, e.g. HYPE basin output files.

Value

ExtractFreq returns a dataframe with probabilities in the first column, and quantiles of data in the following columns. Number of observations per variable in data are given in an attribute n.obs (see attributes).

See Also

PlotDurationCurve

Examples

ExtractFreq(rnorm(1000))


rcapell/RHYPE documentation built on Feb. 28, 2024, 3:11 p.m.