getNAA {discharge} | R Documentation |
Net Annual Anomaly (NAA)
Description
Calculate Net Annual Anomaly (NAA) from the given residual values.
Usage
getNAA(resid, years, for.year = NULL)
Arguments
resid |
A vector of residual values generated with respect to the baseline signal |
years |
A vector of years corrosponding to the residual values |
for.year |
(optional) Calculate NAA values only for the given year in this argument. If argument is omitted, NAA values for all years are calculated. |
Value
Data frame containing two columns:
year | First column, represents year |
NAA | Second column, represents NAA values |
Examples
# load sample data
data("sycamore")
x = sycamore
# get streamflow object for the sample data
x.streamflow = asStreamflow(x)
# prepare baseline signal
x.bl = prepareBaseline(x.streamflow)
# NAA
naa = getNAA(x.bl$resid.sig, x.streamflow$data$year)
[Package discharge version 1.0.0 Index]