schoenersDsimmatrix: Generates similarity matrix for SpatRaster objects in...

View source: R/simmatrixMaker.R

schoenersDsimmatrixR Documentation

Generates similarity matrix for SpatRaster objects in environment.

Description

Applies pairwise comparisons of Schoener's D-metric for SpatRaster objects that are loaded into the environment.

Usage

schoenersDsimmatrix(spatrast)

Arguments

spatrast

Input SpatRaster

Examples

# Create probability-of-origin maps to compare.
myiso <- rast(isoscape, type="xyz")
plot(myiso)
myiso_sd <- rast(isoscape_sd, type="xyz")
n <- 5
set.seed(42)
df <- data.frame(
         ID = LETTERS[1:n],
         isotopeValue = sample(-120:-40, n),
         SD_indv = rep(5, n)
         )
assignmentModels <- isotopeAssignmentModel(
                        ID = df$ID,
                        isotopeValue = df$isotopeValue,
                        SD_indv = df$SD_indv,
                        precip_raster = myiso,
                        precip_SD_raster = myiso_sd,
                        nClusters = FALSE
                        )
raster::plot(assignmentModels)
# Compare maps with simmatrixMaker.
simmatrix(assignmentModels)



cjcampbell/IsoModAT documentation built on June 12, 2024, 8:23 p.m.