Converts a co-located co-occurrence matrix (cocoma) to a co-located co-occurrence vector (cocove)
get_cocove(x, ordered = TRUE, normalization = "none")
x | A matrix - an output of the |
---|---|
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". |
A co-located co-occurrence vector
library(comat) data(raster_x, package = "comat") data(raster_x_na, package = "comat") coom = get_cocoma(raster_x, raster_x_na) coom#> 1 2 3 #> 1 3 1 3 #> 2 0 2 1 #> 3 2 2 2coov = get_cocove(coom) coov#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] #> [1,] 3 0 2 1 2 2 3 1 2