get_compare_plot: get network difference plot from NetCompare and quickNet...

View source: R/get_compare_plot.R

get_compare_plotR Documentation

get network difference plot from NetCompare and quickNet results.

Description

get network difference plot from NetCompare and quickNet results.

Usage

get_compare_plot(
  NetCompare,
  network_G,
  maximum = 0.47,
  use.mask = "none",
  output = TRUE,
  prefix = "",
  path = ".",
  device = "pdf",
  width = 10,
  height = 7,
  ...
)

Arguments

NetCompare

the result of quickNet::NetCompare.

network_G

the result of quickNet::quickNet. The plot configurations of the results will be the same as network_G, but the legend and pie circle will be removed.

maximum

regards the highest of the maximum or highest absolute edge weight as the highest weight to scale the edge widths too. To compare several graphs, set this argument to a higher value than any edge weight in the graphs (typically 1 for correlations). If you want the same scale as network_G, keep it same as the number you set in quickNet.

use.mask

only present significant different edges that are non-zero in the EBICglasso networks constructed from data1, data2, or both.

  • "none": present all significantly different edges.

  • "net1": only present significantly different edges that are non-zero in the EBICglasso network constructed from data1.

  • "net2": only present significantly different edges that are non-zero in the EBICglasso network constructed from data2.

  • "both": only present significantly different edges that are both non-zero in the EBICglasso networks constructed from data1 and data2.

output

whether output the plots as pdf files.

prefix

the prefix of output plot files.

path

the path of output files, can be either a relative or absolute path.

width

the width of plot, in inch.

height

the height of plot, in inch.

  • the parameter prefix, path, width, and height only works when output is TRUE.

...

... other parameter from pdf or svg.

Value

a list contains the diff_plot, diff_pos_plot and diff_neg_plot, representing the network difference of global, nw1>nw2 and nw1<nw2.

Examples

data('mtcars')
network_G <- quickNet(mtcars)
NetCompare <- NetCompare(mtcars,mtcars^3,it=100)
get_compare_plot(NetCompare, network_G, output = FALSE)


LeiGuo0812/quickNet documentation built on May 1, 2024, 10:42 p.m.