equalExtent | R Documentation |
Assess whether a list of extents are all equal
equalExtent(extents)
## S4 method for signature 'list'
equalExtent(extents)
extents |
list of extents objects |
Eliot McIntire
library(terra)
files <- system.file("maps", package = "quickPlot")
files <- dir(files, full.names = TRUE, pattern = "tif")
maps <- lapply(files, function(x) terra::rast(x))
names(maps) <- sapply(basename(files), function(x) {
strsplit(x, split = "\\.")[[1]][1]
})
extnts <- lapply(maps, terra::ext)
equalExtent(extnts) ## TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.