plot_raster_by_name: Plot a raster by its name

View source: R/Patch_Morph.R

plot_raster_by_nameR Documentation

Plot a raster by its name

Description

plot_raster_by_name plots a raster from a list of rasters based on the provided raster name.

Usage

plot_raster_by_name(rasters, raster_name)

Arguments

rasters

list A list of rasters.

raster_name

character The name of the raster to be plotted.

Value

NULL This function does not return a value. It plots the raster if found.

Examples

## Not run: 
# Define a list of rasters
rasters <- list(raster1 = raster::raster(matrix(1:100, 10, 10)),
                raster2 = raster::raster(matrix(101:200, 10, 10)))

# Assign names to the rasters
names(rasters[[1]]) <- "raster1"
names(rasters[[2]]) <- "raster2"

# Plot a raster by its name
plot_raster_by_name(rasters, "raster1")

## End(Not run)


bi0m3trics/spanner documentation built on June 9, 2025, 3:57 p.m.