depth: depth of SpatRaster layers

depthR Documentation

depth of SpatRaster layers

Description

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

Usage

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

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

## S4 method for signature 'SpatRaster'
depthName(x)

## S4 replacement method for signature 'SpatRaster'
depthName(x)<-value

## S4 method for signature 'SpatRaster'
depthUnit(x)

## S4 replacement method for signature 'SpatRaster'
depthUnit(x)<-value

Arguments

x

SpatRaster

value

numeric vector (depth), or character (depthName and depthUnit)

Value

numeric or SpatRaster

See Also

time

Examples

s <- rast(nlyr=3)

depth(s) <- c(0, pi/2, pi)
depth(s)

depthName(s) <- "angle"
depthUnit(s) <- "radians"
s

terra documentation built on April 12, 2025, 1:43 a.m.