get_incove: Create an integrated co-occurrence vector (incove)

Description Usage Arguments Details Value Examples

View source: R/get_incove.R

Description

Converts an integrated co-occurrence matrix (incoma) to an integrated co-occurrence vector (incove)

Usage

1
get_incove(x, ordered = TRUE, repeated = TRUE, normalization = "none")

Arguments

x

A matrix - an output of the get_incoma() function

ordered

The type of pairs considered. Either "ordered" (TRUE) or "unordered" (FALSE). The default is TRUE. See details for more explanation.

repeated

Should the repeated co-located co-occurrence matrices be used? Either "repeated" (TRUE) or "unrepeated" (FALSE). The default is TRUE. See details for more explanation.

normalization

Should the output vector be normalized? Either "none" or "pdf". The "pdf" option normalizes a vector to sum to one. The default is "none".

Details

All values are kept when ordered = TRUE and repeated = TRUE. When ordered = TRUE and repeated = FALSE all values from cocoma (but only one cocoma for each pair) and all coma values are kept. ordered = FALSE and repeated = TRUE keeps all values from cocoma, but divides coma values by 2. ordered = FALSE and repeated = FALSE keeps all values from cocoma (but only one cocoma for each pair), and divides coma values by 2.

Value

An integrated co-occurrence vector

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(comat)

data(raster_x, package = "comat")
data(raster_w, package = "comat")
x = list(raster_x, raster_w, raster_x)

incom = get_incoma(x)
incom

incov1 = get_incove(incom)
incov1

incov2 = get_incove(incom, ordered = FALSE)
incov2

incov3 = get_incove(incom, ordered = FALSE, normalization = "pdf")
incov3

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