patch_stats: patch_stats

Description Usage Arguments Details Value References Examples

View source: R/patch_stats.R

Description

Calculate patch statistics for a given class (i.e. cell value) in a numeric matrix.

Usage

1

Arguments

mat

A numeric matrix.

class

The patch class for which statistics should be calculated.

Details

Statistics are based on and inspired by SDMTools::ClassStat, FRAGSTATS and Faye et al. 2016

Value

A dataframe containing:

class

The patch class for which statistics were calculated.

area

Total area (number of cells).

prop

Proportion of landscape area represented by cells in the given class.

perim

Total perimeter (number of outside edges).

perim_min

Minimum perimeter, given the number of cells.

inside_edges

Total number of shared, inside edges.

inside_edges_max

Maximum number of inside edges that could be shared, given the number of cells.

shape_index

Patch shape index. Calculated as the observed perimeter divided by the minimum perimeter. See FRAGSTATS p.101.

AI

Aggregation index. Calculated as the observed number of shared, inside edges divided by the maximum number that could be shared. See He et al. 2000.

cohesion

Cohesion index. Calculated from the area and perimeter of cells in the given class relative to the area of the entire landscape. See Scuhmaker 1996.

References

Examples

1
2
3
4
5
6
7
8
# Create matrix
mat <- matrix(c(1,1,2,1,
                1,0,2,0,
                1,2,0,1,
                2,2,0,1), nrow = 4, ncol  = 4,
              byrow = TRUE)

patch_stats(mat = mat, class = 1)

rasenior/PatchStatsFLIR documentation built on Oct. 28, 2020, 11:53 p.m.