TrendClassification {greenbrown}R Documentation

Classify a raster in greening and browning trends


This function classifies a RasterBrick with trend estimates as computed with TrendRaster into positive, negative and no trend per each time series segment.


TrendClassification(r, min.length = 0, max.pval = 0.05, ...)



multi-layer raster object of class brick as computed with TrendRaster


Minimum duration of a trend in time steps of the input raster (see Details).


Maximum p-value to classify a trend as being significant.


additional arguments as for writeRaster


This function expects a RasterBrick as created with TrendRaster as input and classifies for each pixel and each time series segment if a trend is significant positive, significant negative or not significant (no trend). Per default a p-value of 0.05 is used to classify trends as significant. Additionally, the minimum duration of a trend can be specified with min.length: For example, if only time series segments longer than 10 years should be considered as trend, set min.length=11 in case of annual data. In case of monthly data set it to 132 (12 observations per year * 11 years). The function CompareClassification can be used to compare classified trends from different methods or data sets.


The function returns a RasterLayer in case of one time series segment or a RasterBrick in case of multiple time series segments. Pixels with a significant positive trend have the value 1; pixels with significant negative trends -1 and non-significant trends 0.


Matthias Forkel <> [aut, cre]

See Also

TrendRaster, CompareClassification


# load a multi-temporal raster dataset of Normalized Difference Vegetation Index
plot(ndvimap, 8)

# calculate trends on the raster
trendmap <- TrendRaster(ndvimap, start=c(1982, 1), freq=12, method="AAT", breaks=2)

# classify the trends in greening and browning
greenbrownmap <- TrendClassification(trendmap, min.length=10, max.pval=0.05)
plot(greenbrownmap, col=brgr.colors(3))

[Package greenbrown version 2.4.3 Index]