units of SpatRaster or SpatRasterDataSet
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
s <- rast(system.file("ex/logo.tif", package="terra")) units(s) <- c("m/s", "kg", "ha") units(s) s units(s) <- "kg" units(s)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.