plot_networks: Plot a network (estimated from 'mdine') for each group

Description Usage Arguments Details Examples

View source: R/post_functions.R

Description

Plot a network (estimated from mdine) for each group

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot_networks(
  obj,
  v.col = NULL,
  e.col = NULL,
  lay0 = layout_in_circle,
  lay1 = layout_in_circle,
  lab0 = "Group 0",
  lab1 = "Group 1",
  scale_line_width = 30,
  vertex.size = 50,
  vertex.labs = NULL,
  vertex.label.cex = NULL
)

Arguments

obj

An object of class mdine

v.col

Vertex colours. If null, a colour blind-friendly pallete is used

e.col

Edge colour.

lay0

igraph layout for group 0

lay1

igraph layout for group 1

lab0

Main label for group 0 network

lab1

Main label for group 1 network

scale_line_width

Scaling factor for with of network edges

vertex.size

Scaling factor for vertex size

vertex.labs

Character vector containing vertex labels

vertex.label.cex

Scaling factor for vertex labels

Details

Plots an igraph-based network for each group. Note that this function has limited functionality and is intended only for immediate visualization of the networks. To plot more sophisticated networks, please use the adj2ig() function along with plot.igraph().

Examples

1
2
3
4
5
6
library(mdine)
data(crohns)

X <- model.matrix(~disease, data=crohns$covars)
md.fit <- mdine(Y=crohns$otu.counts, X=X, Z=X[,2], mc.cores=1, iter=1000)
plot_networks(md.fit)

kevinmcgregor/mdine documentation built on April 10, 2021, 4:18 a.m.