diff_plot {metanetwork}R Documentation

plot difference network

Description

Function to represent difference between two networks belonging to a metanetwork with specific layout ('TL-tsne' or group 'TL-tsne') using either 'ggnet' or 'visNetwork' visualisation. This function represent the difference between g1 and g2 (g1-g2).

Usage

diff_plot(
  metanetwork,
  g1,
  g2,
  beta = 0.1,
  mode = "TL-tsne",
  vis_tool = "ggnet",
  edge_thrs = NULL,
  layout_metaweb = FALSE,
  flip_coords = FALSE,
  alpha_per_group = NULL,
  alpha_per_node = NULL,
  TL_tsne.config = TL_tsne.default,
  nrep_ly = 1,
  ggnet.config = ggnet.default,
  visNetwork.config = visNetwork.default
)

Arguments

metanetwork

object of class 'metanetwork'

g1

network (of class 'igraph') of metanetwork

g2

network (of class 'igraph') of metanetwork

beta

the diffusion parameter of the diffusion kernel, a positive scalar controlling the squeezing of the network

mode

mode used for layout, either 'TL-tsne' or 'group-TL-tsne' (see attach_layout()). Default is 'TL-tsne'

vis_tool

a character indicating the visualisation tool, either 'ggnet' or visNetwork

edge_thrs

if non-null, a numeric (between 0 and 1) indicating an edge threshold for the representation

layout_metaweb

a boolean indicating whether the layout of the metaweb should be used to represent the difference network. to use metaweb layout = T, you need first to compute 'TL-tsne' layout for the metaweb for this beta value using attach_layout()

flip_coords

a boolean indicating whether coordinates should be flipped. In that case, y-axis is the trophic level and x-axis is the layout axis

alpha_per_group

controlling alpha per group (only for 'ggnet' vis), a list of format list(resolutions = "XX",groups = XX,alpha_focal = XX,alpha_hidden = XX), see example

alpha_per_node

controlling alpha per node (only for 'ggnet' vis), a list of format list(nodes = XX,alpha_focal = XX,alpha_hidden = XX), see example

TL_tsne.config

configuration list for mode 'TL-tsne', default is TL_tsne.default

nrep_ly

If several layouts for this beta value are attached to the metaweb (if layout_metaweb = T), index of the layout to use, see attach_layout()

ggnet.config

configuration list for ggnet representation, default is ggnet.default

visNetwork.config

configuration list for visNetwork representation, default is visNetwork.default

Value

an object of class ggplot or visNetwork, representation of the difference network

See Also

attach_layout()

Examples

#on Angola dataset
library(igraph)
library(metanetwork)

data(meta_angola)

diff_plot(g1 = meta_angola$X2003,g2 = meta_angola$X1986,metanetwork = meta_angola,
beta = 0.05)




[Package metanetwork version 0.7.0 Index]