# NOT RUN {
# generate an incidence matrix
data <- matrix(c(1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0), nrow = 3)
colnames(data) <- letters[1:5]
rownames(data) <- LETTERS[1:3]
# run findCluster() to do clustering
cls <- findCluster(
data,
part = 1,
method = "all",
normalization = FALSE,
rm_weak_edges = TRUE,
comparison = FALSE
)
# plot the cluster with Louvain method
plotCluster(graph = cls$graph, cluster = cls$louvain)
# }
Run the code above in your browser using DataLab