Description Usage Arguments Value Author(s) See Also Examples
This function corrects a time series with days-of-years (e.g. start of growing season). For example, if the start of season occurs in one year at the end of the calendar year (doy
> 305) and in another year at the beginning (doy
< 60), the DOYs are corrected so that all values occur at the beginning of the year (e.g. negative DOYs will be produced) or at the end of the year (e.g. DOY > 365 will be produced). This function is applied in Phenology
after phenology detection on sos, eos, pop and pot time series (see examples).
1 | CorrectDOY(doy, check.outliers = TRUE)
|
doy |
a vector or time series representing DOYs |
check.outliers |
Set outliers to NA after correction? Outliers are defined here as: |
a vector or time series
Matthias Forkel <matthias.forkel@tu-dresden.de> [aut, cre]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # imagine the following start of season DOYs in 10 years
sos <- ts(c(15, 10, 12, 8, 10, 3, 362, 2, 1, 365), start=1982)
plot(sos)
# Visually, there seems to be big differences in the start of season. However,
# there is actually only one day between the last two values (DOY 1 = 1st January,
# DOY 365 = 31st December). Trend calculation fails on this time series:
plot(Trend(sos), ylab="SOS")
# The DOY time series needs to be corrected to analyze
# the true differences between days.
sos2 <- CorrectDOY(sos)
plot(Trend(sos2), ylab="SOS")
# The correction now allows trend analysis.
# Negative DOYs indicate days at the end of the previous year!
# other example
sos <- ts(c(5, 12, 15, 120, 363, 3, 362, 365, 360, 358), start=1982)
plot(sos) # one value seems like an outlier
sos2 <- CorrectDOY(sos)
plot(Trend(sos2), ylab="SOS")
# The outlier is removed.
# DOYs > 365 indicate days in the next year!
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.