get_cocoma: Create a co-located co-occurrence matrix (cocoma)

Description Usage Arguments Value Examples

View source: R/get_cocoma.R

Description

Create a co-located co-occurrence matrix (cocoma)

Usage

1
get_cocoma(x, y, neighbourhood = 4, classes = NULL)

Arguments

x

A matrix with categories

y

A matrix with categories

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4.

classes

A list of length 2 with the values of selected classes from the x and y objects. It is used to calculate cocoma only for selected classes.

Value

A co-located co-occurrence matrix

Examples

1
2
3
4
5
6
7
8
library(comat)
data(raster_x, package = "comat")
data(raster_x_na, package = "comat")

coom = get_cocoma(raster_x, raster_x_na)
coom

get_cocoma(raster_x, raster_x_na, classes = list(c(1, 2), 3))

comat documentation built on Oct. 14, 2021, 5:22 p.m.