st_shannon_index: Calculate the Shannon's Diversity Index

View source: R/st_shannon_index.R

st_shannon_indexR Documentation

Calculate the Shannon's Diversity Index

Description

This function calculates the Shannon's Diversity Index for landscapes.

Usage

st_shannon_index(
  tool = "sf",
  x,
  field,
  geom.boundary = NULL,
  do.preProcessing = TRUE,
  return.geom = FALSE,
  quiet = TRUE
)

Arguments

tool

tool to perform dissolve operation. Default is "sf". However, for complex polygons "grass" is highly recommended. Fot the use of "grass" a valid GRASS GIS-session mus be initiated. "saga" is NOT supported

x

polygon of class sf

field

field name or table column (character) on which the shannon index is calculated

geom.boundary

polygon of class sf representing subregions, e.g. administrative boundaries

do.preProcessing

If TRUE (default), the input of geom.frag is, first, dissolved by field, and second, splitted to multi-parts. By this step it is assured, that polygon connected to each other are summarized

return.geom

If set to TRUE, geometries (e.g. dissolved) are returned as well. Default: FALSE

quiet

If set to FALSE actual state is printed to console. Default: TRUE.

Value

list with overall Shannon's Diversity Index, and index for each landscape classes. If return.geom is TRUE than list with result and geometry on which SHDI is based is returned.

Note

Code is based on the following references:

  • McGarigal, K., & Marks, B. J. (1995). FRAGSTATS: spatial pattern analysis program for quantifying landscape structure. Gen. Tech. Rep. PNW-GTR-351. Portland, OR: US Department of Agriculture, Forest Service, Pacific Northwest Research Station. 122 p, 351.


raff-k/VLSM documentation built on Oct. 13, 2023, 11:13 a.m.