count_edges: count_edges

View source: R/count_edges.R

count_edgesR Documentation

count_edges

Description

Count the number of edges shared by cells of the same class within a matrix

Usage

count_edges(mat, class, bidirectional = FALSE, diagonals = FALSE)

Arguments

mat

A numeric matrix.

bidirectional

Should both sides of each shared edge be counted? Defaults to FALSE.

diagonals

Should diagonal neighbours be included? Defaults to FALSE.

classes

The patch class of interest. Must be numeric.

Value

A numeric value for the number of edges shared by cells of the given class.


rasenior/ThermStats documentation built on Nov. 16, 2024, 5:34 p.m.