Learn R Programming

migraph (version 0.9.3)

blockmodel_vis: ggplot2-based plotting of blockmodel results

Description

ggplot2-based plotting of blockmodel results

Plots for deciding on the number of network clusters

Usage

# S3 method for block_model
plot(x, ...)

ggtree(hc, k = NULL)

ggidentify_clusters(hc, census, method = c("elbow", "strict"))

Arguments

x

A blockmodel-class object.

...

Additional arguments passed on to ggplot2.

hc

a hierarchical cluster object

k

number of clusters. By default NULL, but, if specified, ggtree will color branches and add a line to indicate where the corresponding cluster cut would be.

census

output from some node_*_census function

method

only "elbow" is currently implemented.

Examples

Run this code
# NOT RUN {
# Unsigned
usa_concor <- blockmodel_concor(mpn_elite_usa_advice)
plot(usa_concor)

# Signed network (Needs sign)
# marvel_concor <- blockmodel_concor(ison_marvel_relationships)
# plot(marvel)
res <- cluster_regular_equivalence(mpn_elite_mex)
ggtree(res, 3)
ggidentify_clusters(res, node_triad_census(mpn_elite_mex))
# }

Run the code above in your browser using DataLab