Learn R Programming

terra (version 0.8-5)

diff: diff

Description

Returns lagged differences.

Usage

# S4 method for SpatRaster
diff(x, filename="", overwrite=FALSE,  wopt=list(), ...)

Arguments

x

SpatRaster

filename

character. Output filename. Optional

overwrite

logical. If TRUE, filename is overwritten

wopt

list. Options for writing files as in writeRaster

...

additional arguments. None implemented

Value

SpatRaster

Examples

Run this code
# NOT RUN {
s <- rast(system.file("ex/logo.tif", package="terra"))   
d <- diff(s)
# }

Run the code above in your browser using DataLab