plotNet: Plot Network

Description Usage Arguments Details Value Examples

Description

Plot a network with specific layout.

Usage

1
plotNet(net, fn = "", th = 1e-06, mylayout = NULL)

Arguments

net

a square adjacency matrix of the network to be plotted.

fn

file name to save the network plot. Default to be an empty string, so the network is plotted to the standard output (screen). NOTE: if a file name is specified, it should be file name for PDF file.

th

numeric value, default to 1e-06. To specify the threshold if the estimated coefficient between two variables is to be considered connected.

mylayout

graph layout to draw the network, default to NULL.

Details

This function serves as the alternative plotting function to allow users to plot a specific network with specific layout, such as plotting the simulated network.

Value

Returns the layout object from igraph package - numeric matrix of two columns and the rows with the same number as the number of vertices.

Examples

1
2
3
4
5
library(XMRF)
n = 200
p = 30
sim <- XMRF.Sim(n=n, p=p, model="LPGM", graph.type="scale-free")
ml = plotNet(sim$B)

XMRF documentation built on May 2, 2019, 8:18 a.m.