Coerce a SpatRaster, SpatRasterCollection, SpatRasterDataset, SpatVector or SpatVectorCollection to a list. With a SpatRaster, each layer becomes a list element. With a SpatRasterCollection or SpatRasterDataset, each SpatRaster becomes a list element. With a SpatVector, each variable (attribute) becomes a list element. With a SpatVectorCollection, each SpatVector becomes a list element.
Usage
# S4 method for SpatRaster
as.list(x, geom=NULL, ...)
# S4 method for SpatRasterCollection
as.list(x, ...)
# S4 method for SpatVector
as.list(x, geom=NULL, ...)
# S4 method for SpatVectorCollection
as.list(x, ...)
Arguments
Value
list
See Also
see coerce for as.data.frame with a SpatRaster; and geom to only extract the geometry of a SpatVector