TrendText: Text of trends in time series

Description Usage Arguments Details Value Author(s) See Also Examples

Description

The function computes a trend in a time series and creates text strings of the estimated trend that ca be used in plots.

Usage

1
2
3
TrendText(Yt, trend = TrendAAT, 
    period = NULL, unit = "unit", 
    per.year = FALSE)

Arguments

Yt

a time series

trend

a function how the trend should be computed, e.g. TrendAAT, TrendRQ, TrendSTM

period

an additional sub-period of x for which trends should be additionally computed

unit

unit of the values in Yt

per.year

Is unit per year? If TRUE, trend is in % yr-2 !

Details

This function is used in MtsPlot

Value

A list with the estimated trends and with text.

Author(s)

Matthias Forkel <matthias.forkel@tu-dresden.de> [aut, cre]

See Also

MtsPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
trd <- TrendText(ndvi, period=c(1982, 1996), unit="")
plot(ndvi)
lines(trd$trd1, col="red", lwd=2)
lines(trd$trd2, col="blue", lwd=2, lty=2)
text(2003, 0.19, trd$full.perc, col="red", cex=1.5) # full trend in %
text(2003, 0.36, trd$full.slope, col="red", cex=1.5) # full trend slope with unit
text(2003, 0.34, trd$full.slope2, col="red", cex=1.5) # full trend slope without unit
text(1988, 0.19, trd$subs.perc, col="blue", cex=1.5) # period: trend in %
text(1988, 0.36, trd$subs.slope, col="blue", cex=1.5) # period: trend slope with unit
text(1988, 0.34, trd$subs.slope2, col="blue", cex=1.5) # period: trend slope without unit

greenbrown documentation built on Dec. 18, 2020, 3:02 p.m.