# generate two adjacency matrices with 15 species and 10 interactions
A <- matrix(0, ncol=15, nrow=15)
A[sample(length(A), 10)] <- runif(10)
B <- matrix(0, ncol=15, nrow=15)
B[sample(length(B), 10)] <- runif(10)
# set the species names
rownames(A) <- rownames(B) <-
colnames(A) <- colnames(B) <- paste0("S", 1:15)
plotNetworkFromMatrix(A, B)
Run the code above in your browser using DataLab