algorithm_metrics {SESraster}R Documentation

Performance of randomization algorithms

Description

Compares the richness and occurrence incidence across species between actual and randomized species distributions

Usage

algorithm_metrics(
  x,
  spat_alg = NULL,
  spat_alg_args = NULL,
  aleats = 10,
  filename = "",
  force_wr_aleat_file = FALSE,
  ...
)

Arguments

x

SpatRaster. A SpatRaster containing presence-absence data (0 or 1) for a set of species.

spat_alg

A function with the algorithm implementing the desired randomization method. It must work with SpatRaster objects. See examples. Example of functions that work are: bootspat_naive, bootspat_str, bootspat_ff.

spat_alg_args

List of arguments passed to the randomization method chosen in 'spat_alg'. See bootspat_naive, bootspat_str, bootspat_ff

aleats

positive integer. A positive integer indicating how many times the calculation should be repeated.

filename

character. Output filename

force_wr_aleat_file

logical. Force writing bootstrapped rasters, even if files fit in memory. Mostly used for internal test units.

...

additional arguments passed to 'terra::app()' function.

Value

a list with two components:

Author(s)

Neander M. Heming

See Also

bootspat_str, bootspat_naive, bootspat_ff, SESraster, plot_alg_metrics

Examples

library(SESraster)
library(terra)
r <- load_ext_data()
algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="species"), aleats = 3)
algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="site"), aleats = 3)
# algorithm_metrics(r, spat_alg = "bootspat_naive", spat_alg_args=list(random="both"))


[Package SESraster version 0.7.0 Index]