nf_to_annual | R Documentation |
nf_to_annual()
sums nfd
, and xts
data from monthly data to annual data.
nf_to_annual(x, ...)
## S3 method for class 'xts'
nf_to_annual(x, ..., year = "cy", full_year = TRUE)
## S3 method for class 'nfd'
nf_to_annual(x, ..., full_year = TRUE, recompute = FALSE, keep_monthly = TRUE)
## S3 method for class 'crss_nf'
nf_to_annual(x, ..., full_year = TRUE, recompute = FALSE, keep_monthly = TRUE)
## S3 method for class 'crssi'
nf_to_annual(x, ..., recompute = FALSE)
x |
An object inheriting from |
... |
Other parameters passed to methods. |
year |
"cy" or "wy" to sum over the calendar or water year,
respectively. For |
full_year |
Only return sums for full years when |
recompute |
If |
keep_monthly |
If |
nf_to_intervening()
, nf_to_total()
# can sum monthly data to annual and get the existing stored annual data
library(CoRiverNF)
ann <- nf_to_annual(monthlyTot)
all.equal(ann, cyAnnTot, check.attributes = FALSE)
# for nfd objects, annual data will be added to object and the monthly
# data are kept by default
nf <- nfd(
monthlyTot["2000/2002"],
flow_space = "total",
time_step = "monthly"
)
nf2 <- nf_to_annual(nf)
# nf2 now has annual data, and monthly data
nf2 <- nf_to_annual(nf, keep_monthly = FALSE)
# nf2 no longer has monthly data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.