temporalTrend {climetrics}R Documentation

Temporal Trend (Slope) of a climate variable

Description

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.

Usage

  temporalTrend(x,...)

Arguments

x

a Raster object or a Raster Time Series of climate variable

...

additional arguments; not implemented

Value

A single Raster layer (RasterLayer or SpatRaster depending on the input)

Author(s)

Shirin Taheri; Babak Naimi

taheri.shi@gmail.com; naimi.b@gmail.com

Examples

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')


[Package climetrics version 1.0-15 Index]