Last chance! 50% off unlimited learning
Sale ends in
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
SpatRaster
character
character
# 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