units | R Documentation |
Get or set the units of the layers of a SpatRaster or the datasets in a SpatRasterDataSet.
## 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
x |
SpatRaster |
value |
character |
character
time, names
s <- rast(system.file("ex/logo.tif", package="terra"))
units(s) <- c("m/s", "kg", "ha")
units(s)
s
units(s) <- "kg"
units(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.