get_complexity: get_complexity

View source: R/prepare_extras.R

get_complexityR Documentation

get_complexity

Description

Calculate complexity of the landscape

Usage

get_complexity(landscape_mat, neighbourhood, ordered, base)

Arguments

landscape_mat

A matrix object

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4.

ordered

The type of pairs considered. Either ordered (TRUE) or unordered (FALSE).

base

The unit in which entropy is measured. The default is "log2",

Details

Calculate complexity of the landscape: entropy of the co-occurrence matrix

Value

matrix

Examples

landscape <- terra::rast(landscapemetrics::landscape)
landscape_mat <- terra::as.matrix(landscape, wide = TRUE)
get_complexity(landscape_mat, neighbourhood = 4, ordered = TRUE, base = "log2")


landscapeecology/landscapemetrics documentation built on April 7, 2024, 11:11 p.m.