Learn R Programming

shar (version 2.3.1)

plot.rd_ras: plot.rd_ras

Description

Plot method for rd_ras object

Usage

# S3 method for rd_ras
plot(x, n = NULL, col, verbose = TRUE, nrow, ncol, ...)

Value

void

Arguments

x

rd_ras object with randomized raster.

n

Integer with number or vector of ids of randomized raster to plot. See Details section for more information.

col

Vector with color palette used for plotting.

verbose

Logical if messages are printed.

nrow, ncol

Integer with number of rows and columns of plot grid.

...

Not used.

Details

Function to plot randomized raster. If n is a single number, n randomized raster will be sampled to plot. If n is a vector, the corresponding raster will be plotted. col, nrow, ncol are passed to plot.

See Also

randomize_raster, translate_raster

Examples

Run this code
if (FALSE) {
landscape_classified <- classify_habitats(terra::rast(landscape), n = 5, style = "fisher")
landscape_random <- randomize_raster(landscape_classified, n_random = 19)
plot(landscape_random)
}

Run the code above in your browser using DataLab