ExtractFreq {HYPEtools} | R 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 ( |
probs |
numeric, vector of probabilities as in |
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.
NA
s 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
Examples
ExtractFreq(rnorm(1000))