powered by
Get or set the units of the layers of a SpatRaster or the datasets in a SpatRasterDataSet.
# S4 method for SpatRaster units(x)# S4 method for SpatRaster units(x)<-value# S4 method for SpatRasterDataset units(x)# S4 method for SpatRasterDataset units(x)<-value
# S4 method for SpatRaster units(x)<-value
# S4 method for SpatRasterDataset units(x)
# S4 method for SpatRasterDataset units(x)<-value
SpatRaster
character
time, names
# NOT RUN { s <- rast(system.file("ex/logo.tif", package="terra")) units(s) <- c("m/s", "kg", "ha") units(s) s units(s) <- "kg" units(s) # }
Run the code above in your browser using DataLab