getPrecisionPar: Calculate model precision at given threshold values.

View source: R/getPrecisionPar.R

getPrecisionParR Documentation

Calculate model precision at given threshold values.

Description

Function that counts cells (number and proportion) above given values.

Usage

getPrecisionPar(rasterstack, checkVals, method = FALSE, nCluster = FALSE)

Arguments

rasterstack

SpatRaster of probability surfaces

checkVals

vector of numeric 'threshold' values against which to calculate precision

method

is FALSE by default. If character vector, appends a column recording 'method' used.

nCluster

Depreciated. Formerly the number of parallel clusters; retained for back-compatibility. A non-'FALSE' value now issues a message and proceeds serially.

Value

Returns a dataframe of precision values at given threshold.

Examples

myiso <- rast(isoscape, type="xyz")
myiso_sd <- rast(isoscape_sd, type="xyz")
assignmentModels <- isotopeAssignmentModel(
         ID = LETTERS[1:4],
         isotopeValue = seq(-120, -25, length.out = 4),
         SD_indv = rep(5, 4),
         precip_raster = myiso,
         precip_SD_raster = myiso_sd
         )
getPrecisionPar(assignmentModels, checkVals = c(0.001, 0.005, 0.01))


isocat documentation built on July 9, 2026, 5:10 p.m.