calculate_distance_matrix {AnimalSequences} | R Documentation |
Calculate Distance Matrix from Co-occurrence Matrix
Description
This function calculates a distance matrix from a given co-occurrence matrix.
Usage
calculate_distance_matrix(cooccurrence_matrix)
Arguments
cooccurrence_matrix |
A matrix representing the co-occurrence counts of elements. |
Value
A distance matrix computed from the normalized co-occurrence matrix.
Examples
# Example usage:
cooccurrence_matrix <- matrix(c(3, 2, 1, 2, 5, 0, 1, 0, 4), nrow = 3, byrow = TRUE)
result <- calculate_distance_matrix(cooccurrence_matrix)
print(result)
[Package AnimalSequences version 0.2.0 Index]