fig.fromAdj: Plot Adjacency Matrix

Description Usage Arguments Value Examples

View source: R/fig.R

Description

This function uses ggraph to make a ggplot object.

Usage

1
fig.fromAdj(A, n.group = 1)

Arguments

A

An adjacency matrix.

n.group

A character vector or factor. Groupings for the nodes. Used to color the nodes in viridis hues.

Value

A ggplot object.

Examples

1
2
A <- matrix(sample(0:1, 25, replace = TRUE), 5, 5)
fig.fromAdj(A, n.group = c(1, 2, 1, 2, 1))

tpq/miSciTools documentation built on Sept. 16, 2019, 4:43 p.m.