Skip to contents

Get or set the depth of the layers of a SpatRaster. Experimental.

Usage

# S4 method for class 'SpatRaster'
depth(x)

# S4 method for class 'SpatRaster'
depth(x) <- value

Arguments

x

SpatRaster

value

numeric vector

Value

numeric

See also

Examples

s <- rast(system.file("ex/logo.tif", package="terra"))   

depth(s) <- 1:3
depth(s)
#> [1] 1 2 3