{
### Data preparation ###
data("Two_group")
### One input network analysis ###
network_results <- network_analysis(
taxobj = Two_group,
taxlevel = "Base",
reads = FALSE,
n = 10,
threshold = 0.6
)
# Convert network results to a data frame for the adjacency matrix
network_matrix <- as.data.frame(network_results[[3]]) # Complete adjacency matrix
# Check initial natural connectivity
nc_initial <- nc(network_matrix)
print(nc_initial) # Print the initial natural connectivity
}
Run the code above in your browser using DataLab