temporalTrend | R Documentation |
The method calculates the trend of a climate variable changes over time. The function use a Raster time series as input and returns a Raster object that represent the trend at the pixel level.
temporalTrend(x,...)
x |
a Raster object or a Raster Time Series of climate variable |
... |
additional arguments; not implemented |
A single Raster layer (RasterLayer or SpatRaster depending on the input)
Shirin Taheri; Babak Naimi
taheri.shi@gmail.com; naimi.b@gmail.com
filePath <- system.file("external/", package="climetrics") # path to the dataset folder
# read the climate variables using the terra package (you can use the raster package as well):
pr <- rast(paste0(filePath,'/precip.tif'))
tr <- temporalTrend(pr)
# plot(tr, main='Trend (slope) of Precipitation time series')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.