get_cove: Create a co-occurrence vector (cove)

Description Usage Arguments Value Examples

View source: R/get_cove.R

Description

Converts a co-occurrence matrix (coma) to a co-occurrence vector (cove)

Usage

1
get_cove(x, ordered = TRUE, normalization = "none")

Arguments

x

A matrix - an output of the get_coma() function

ordered

The type of pairs considered. Either "ordered" (TRUE) or "unordered" (FALSE). The default is TRUE.

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".

Value

A co-occurrence vector

Examples

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

com = get_coma(raster_x)
com

cov = get_cove(com)
cov

cov = get_cove(com, normalization = "pdf")
cov

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