collapsedGraph | R Documentation |
Return an adjacency matrix after collapsing clusters into their central nodes.
collapsedGraph(A, clustersInfo)
A |
An adjacency Matrix. |
clustersInfo |
Obtained from graphComponents |
A weighted adjacency matrix between clusters and unclustered nodes.
## Not run: data(DrySeeds) res <- betaMix(DrySeeds, maxalpha = 1e-4,ppr = 0.01, ind=TRUE) adjMat <- getAdjMat(res) rownames(adjMat) = colnames(DrySeeds) SimComp <- graphComponents(adjMat) Adj1 <- collapsedGraph(adjMat, SimComp) > 0 # with the igraph package, we can do: # plot(graph.adjacency(Adj1, mode="undirected"), vertex.label=rownames(Adj1), # vertex.label.cex=0.7, vertex.size=0, vertex.frame.color="white", # vertex.label.color='blue', edge.color='grey80', asp=1) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.