Learn R Programming

CommKern (version 1.0.1)

community_plot: Communities by layer plot

Description

Generate a graphical representation of the communities and layers.

Usage

community_plot(x, ...)

Value

a gtable object

Arguments

x

a spinglass_net object created by hms

...

additional arguments from other methods

Details

This is an ancillary function that creates the plots seen in the manuscript, with a heatmap-style plot on the top panel, derived from a network adjacency matrix, and a community assignment plot on the bottom panel, separated by layer.

See Also

link{hms}

Examples

Run this code

data(SBM_net)

# \donttest{
# plot with max of two layers
SBM_netcomm <- hms(
  input_net  = SBM_net,
  spins      = 4,
  alpha      = 0,
  coolfact   = 0.90,
  tol  = 0.05,
  max_layers = 2
  )

community_plot(SBM_netcomm)
# }

# \donttest{
# plot with three layers
# don't run automatically on CRAN; > 5 seconds
SBM_netcomm <- hms(
  input_net  = SBM_net,
  spins      = 4,
  alpha      = 0,
  coolfact   = 0.90,
  tol  = 0.05,
  max_layers = 3
  )

community_plot(SBM_netcomm)
# }

Run the code above in your browser using DataLab