analyze_network_structure {topolow} | R Documentation |
Calculate Network Analysis Metrics
Description
Analyzes the connectivity pattern in a distance matrix by converting it to a network representation. Useful for assessing data completeness and structure.
Usage
analyze_network_structure(distance_matrix)
Arguments
distance_matrix |
Square symmetric matrix of distances |
Value
A list containing the network analysis results:
adjacency |
A logical |
connectivity |
A |
summary |
A list of overall network statistics, including |
Examples
# Create a sample distance matrix
dist_mat <- matrix(runif(25), 5, 5)
# Add row and column names
rownames(dist_mat) <- colnames(dist_mat) <- paste0("Point", 1:5)
dist_mat[lower.tri(dist_mat)] <- t(dist_mat)[lower.tri(dist_mat)]
diag(dist_mat) <- 0
dist_mat[1, 3] <- NA; dist_mat[3, 1] <- NA
# Analyze the network structure
metrics <- analyze_network_structure(dist_mat)
print(metrics$summary$completeness)
[Package topolow version 1.0.0 Index]