units {terra} | R Documentation |
units of SpatRaster or SpatRasterDataSet
Description
Get or set the units of the layers of a SpatRaster or the datasets in a SpatRasterDataSet.
Usage
## S4 method for signature 'SpatRaster'
units(x)
## S4 replacement method for signature 'SpatRaster'
units(x)<-value
## S4 method for signature 'SpatRasterDataset'
units(x)
## S4 replacement method for signature 'SpatRasterDataset'
units(x)<-value
Arguments
x |
SpatRaster |
value |
character |
Value
character
See Also
Examples
s <- rast(system.file("ex/logo.tif", package="terra"))
units(s) <- c("m/s", "kg", "ha")
units(s)
s
units(s) <- "kg"
units(s)
[Package terra version 1.7-78 Index]