region: Find a region of values in a hexmatrix

Description Usage Arguments Value

View source: R/region.R

Description

For a given hexmatrix and a given index of a cell, find all indices of all neighbours that have the same value.

Usage

1
region(m, i)

Arguments

m

A hexmatrix of values

i

A index of a cell to start from

Value

A vector of indices of cells that are neighbours of i and have the same value in m as m[i], or cells recursively neighbouring with such neighbours.


beerda/hexmatrix documentation built on May 2, 2021, 4:15 a.m.