Learn R Programming

XMRF (version 1.0)

plotNet: Plot Network

Description

Plot a network with specific layout.

Usage

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.

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.

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.

Examples

Run this code
library(XMRF)
n = 200
p = 30
sim <- XMRF.Sim(n=n, p=p, model="LPGM", graph.type="scale-free")
ml = plotNet(sim$B)

Run the code above in your browser using DataLab