Learn R Programming

SEMgraph (version 1.2.3)

cplot: Subgraph mapping

Description

Map groups of nodes onto an input graph, based on a membership vector.

Usage

cplot(graph, membership, l = layout.auto, map = FALSE, verbose = FALSE, ...)

Value

The list of clusters and cluster mapping as igraph objects.

Arguments

graph

An igraph object.

membership

Cluster membership vector for each node.

l

graph layout. One of the igraph layouts. If this argument is ignored, an automatic layout will be applied.

map

A logical value. Visualize cluster mapping over the input graph. If FALSE (default), visualization will be disabled. For large graphs, visualization may take long.

verbose

A logical value. If FALSE (default), the processed graphs will not be plotted to screen, saving execution time (they will be returned in output anyway).

...

Currently ignored.

Author

Mario Grassi mario.grassi@unipv.it

See Also

clusterGraph, clusterScore

Examples

Run this code

# \donttest{
# Clustering ALS graph with WTC method
G <- alsData$graph
membership <- clusterGraph(graph = G, type = "wtc")
cplot(G, membership, map = TRUE, verbose = FALSE)
cplot(G, membership, map = FALSE, verbose = TRUE)
# The list of cluster graphs !
cg <- cplot(G, membership); cg
# }

Run the code above in your browser using DataLab