# \donttest{
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'))
gv <- gVelocity(pr)
plot(gv, main='Gradiant-based Velocity for Precipitation')
# }
Run the code above in your browser using DataLab