Learn R Programming

nethet (version 1.4.0)

plot_2networks: Plot two networks (GGMs)

Description

Plot two networks (GGMs)

Usage

plot_2networks(invcov1, invcov2, node.label = paste("X", 1:nrow(invcov1), sep  = ""), main = c("", ""), ...)

Arguments

invcov1
Inverse covariance matrix of GGM1.
invcov2
Inverse covariance matrix of GGM2.
node.label
Names of nodes.
main
Vector (two elements) with network names.
...
Other arguments (see plot.network).

Value

Figure with two panels (for each network).

Examples

Run this code
n <- 70
p <- 30

## Specifiy sparse inverse covariance matrices,
## with number of edges in common equal to ~ 0.8*p
gen.net <- generate_2networks(p,graph='random',n.nz=rep(p,2),
                              n.nz.common=ceiling(p*0.8))

invcov1 <- gen.net[[1]]
invcov2 <- gen.net[[2]]

plot_2networks(invcov1,invcov2,label.pos=0,label.cex=0.7)

Run the code above in your browser using DataLab