Description Usage Arguments Value Author(s) See Also Examples
Get annual maxima and more information from time series
1 |
dates |
Dates in ascending order.
Can be charater strings or |
values |
Values to be mapped in color with |
data |
Optional: data.frame with the column names as given by dates and values |
shift |
Number of days to move the year-break to. E.g. shift=61 for German hydrological year (Nov to Oct). DEFAULT: 0 |
missing2NA |
Logical. If years are completely missing in |
data.frame with one row per (hydrological) year (h_year) with the columns:
year, max, date, doy (day of h_year), n (number of non-NA values),
days (number of days per h_year in input data) and rownr.
The rownames of the output are character strings with the h_year.
Berry Boessenkool, berry-b@gmx.de, Jun 2017
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | load(seasFolder("data/dismeta.Rdata"))
annmax <- annualMax("date","Koeln", dis)
head(annmax)
plot(annmax[,1:2], type="l", las=1, xlab="year")
plot(annmax$year, annmax$doy)
head(annualMax("date","Koeln", dis))
head(annualMax("date","Koeln", dis, shift=117)) # hydrological year
berryFunctions::seasonality("date","Koeln", dis, shift=117)
annmax <- annualMax("date","Koeln", dis, shift=117)
berryFunctions::linReg(doy~year, data=annmax); abline(h=150)
berryFunctions::linReg(doy~year, data=annmax[120:190,]); abline(h=150)
# No real trend in timing of annual streamflow maximum in Cologne
dis2 <- dis[dis$Koeln>9000,]
head(annualMax("date","Koeln", dis2))
head(annualMax("date","Koeln", dis2, missing2NA=FALSE))
#View(dis[,c("date","Koeln")])
plot(head(dis[,c("date","Koeln")], 500), type="l")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.