Subset spatRaster layers; return layers that match subset names, ignore those that do not?
I’m looping through rasters and would like to select a subset of layers if they match certain layer names that I’m looking for. When using terra::subset, an error will occur if a layer name is specified that does not exist in the raster. Is there a way to just return layer names that match and… Read More Subset spatRaster layers; return layers that match subset names, ignore those that do not?