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')
Run the code above in your browser using DataLab