match_na_raster {mop}R Documentation

Match NA cells for all layers in SpatRaster

Description

Options to identify which values in a set of conditions of interest (g_matrix) are outside the range of a set of conditions of reference (m_matrix).

Usage

match_na_raster(layers)

Arguments

layers

a SpatRaster object containing two or more variables to be matched.

Value

A SpatRaster object with NA cells matching in all layers.

Examples

# data
layers <- terra::rast(system.file("extdata", "reference_layers.tif",
                      package = "mop"))

# add NA in some places
layers[20:24, 10:16][, 3] <- NA
terra::plot(layers)

# match NAs
matched <- match_na_raster(layers)
terra::plot(matched)

[Package mop version 0.1.2 Index]