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 |
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 |
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
|
alpha_per_node |
controlling alpha per node (only for 'ggnet' vis), a list of format
|
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 |
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
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)