diff | R Documentation |
Compute the difference between consecutive layers in a SpatRaster.
## S4 method for signature 'SpatRaster'
diff(x, lag=1, filename="", ...)
x |
SpatRaster |
lag |
positive integer indicating which lag to use |
filename |
character. Output filename |
... |
additional arguments for writing files as in |
SpatRaster
s <- rast(system.file("ex/logo.tif", package="terra"))
d <- diff(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.