neighbourhoods: Neighbourhood of complete lattice grid

Description Usage Arguments Value Author(s) Examples

Description

This function provides a single wrapper to neighbourhood_moore and neighbourhood_neumann. It is advised that this function be called to find the neighbourhoods in this package, as it provides the most error checks

Usage

1
neighbourhoods(x, order = 1, method = "Moore")

Arguments

x

the lattice grid for which a neighbourhood structure is required

order

the order of the neighbourhood system

method

the neighbourhood method, 'Moore' or 'von Neumann'

Value

a matrix, where each row corresponds to an observations neighbours

Author(s)

Kevin Brosnan (kevin.c.brosnan@gmail.com)

Examples

1
2
 y <- matrix(sample(c(-1, 1), size = 16, prob = c(0.6, 0.4), replace = TRUE), nrow = 4)
 neigh <- neighbourhoods(x = y, order = 1, method = "Moore")

significantstats/gatingfc documentation built on May 8, 2019, 8:48 a.m.