Learn R Programming

prior3D (version 0.1.5)

sumrast: Sum list of SpatRaster objects.

Description

Sum list of SpatRaster objects.

Usage

sumrast(x, normalize = TRUE)

Value

A SpatRaster object.

Arguments

x

List of SpatRaster objects.

normalize

If TRUE, then sum of solutions is normalized at a \([0,1]\) scale.

See Also

plot_sumrast

Examples

Run this code
set.seed(42)
x <- terra::rast(matrix(rbinom(100, 1, 0.2), nrow=10))
y <- terra::rast(matrix(rbinom(100, 1, 0.8), nrow=10))
sumrast(list(x, y))

Run the code above in your browser using DataLab