{
### 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
)
network_matrix <- as.data.frame(network_results[[3]]) # Complete adjacency matrix
# Check initial natural connectivity
nc <- nc(network_matrix)
# Conduct natural connectivity analysis
nc_remove <- NC_remove(input = network_matrix)
head(nc_remove)
tail(nc_remove)
# Set target number for natural connectivity analysis
nc_remove <- NC_remove(input = network_matrix, num = 400)
}
Run the code above in your browser using DataLab