Convert raster input to list
Usage
landscape_as_list(landscape)
# S3 method for class 'SpatRaster'
landscape_as_list(landscape)
# S3 method for class 'RasterLayer'
landscape_as_list(landscape)
# S3 method for class 'RasterBrick'
landscape_as_list(landscape)
# S3 method for class 'RasterStack'
landscape_as_list(landscape)
# S3 method for class 'stars'
landscape_as_list(landscape)
# S3 method for class 'list'
landscape_as_list(landscape)
# S3 method for class 'matrix'
landscape_as_list(landscape)
# S3 method for class 'numeric'
landscape_as_list(landscape)
# S3 method for class 'PackedSpatRaster'
landscape_as_list(landscape)
Examples
landscape <- terra::rast(landscapemetrics::landscape)
landscape_as_list(c(landscape, landscape))
#> [[1]]
#> class : SpatRaster
#> dimensions : 30, 30, 1 (nrow, ncol, nlyr)
#> resolution : 1, 1 (x, y)
#> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax)
#> coord. ref. :
#> source(s) : memory
#> name : clumps
#> min value : 1
#> max value : 3
#>
#> [[2]]
#> class : SpatRaster
#> dimensions : 30, 30, 1 (nrow, ncol, nlyr)
#> resolution : 1, 1 (x, y)
#> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax)
#> coord. ref. :
#> source(s) : memory
#> name : clumps
#> min value : 1
#> max value : 3
#>