count_edges: count_edges

Description Usage Arguments Value

View source: R/count_edges.R

Description

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

Usage

1
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 Oct. 31, 2020, 3:48 p.m.