patch_stats: patch_stats

View source: R/patch_stats.R

patch_statsR Documentation

patch_stats

Description

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

Usage

patch_stats(mat, class)

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

  • SDMTools: Species Distribution Modelling Tools: Tools for processing data associated with species distribution modelling exercises. Available on CRAN.

  • McGarigal, K., S. A. Cushman, M. C. Neel, and E. Ene. 2002. FRAGSTATS: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors at the University of Massachusetts, Amherst. Available at the following web site: www.umass.edu/landeco/research/fragstats/fragstats.html

  • Faye, E. , Rebaudo, F. , Yánez‐Cajo, D. , Cauvy‐Fraunié, S. , Dangles, O. and Tatem, A. (2016), A toolbox for studying thermal heterogeneity across spatial scales: from unmanned aerial vehicle imagery to landscape metrics. Methods Ecol Evol, 7: 437-446. https://doi.org/10.1111/2041-210X.12488

  • He, H.S., DeZonia, B.E. & Mladenoff, D.J. (2000), An aggregation index (AI) to quantify spatial patterns of landscapes. Landscape Ecology, 15: 591. https://doi.org/10.1023/A:1008102521322

  • Schumaker, N. H. (1996), Using landscape indices to predict habitat connectivity. Ecology, 77: 1210-1225. https://doi.org/10.2307/2265590

Examples

# 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/ThermStats documentation built on Nov. 16, 2024, 5:34 p.m.