Function that provides network dynamic representation (using 'visNetwork') from a 'metanetwork' object with a layout based on a diffusion kernel
vismetaNetwork(
metanetwork,
g = NULL,
beta = 0.1,
legend = NULL,
mode = "TL-tsne",
edge_thrs = NULL,
layout_metaweb = FALSE,
nrep_ly = 1,
flip_coords = FALSE,
diff_plot_bool = FALSE,
x_y_range = c(100, 100),
visNetwork.config = visNetwork.default,
TL_tsne.config = TL_tsne.default
)
object of class metanetwork
network (igraph object) to represent, default is metaweb
the diffusion parameter of the diffusion kernel, a positive scalar controlling the vertical squeezing of the network
resolution for the legend, legend resolution must be a coarser resolution than the resolution of g, default is NULL
mode used for layout, 'TL-tsne' for trophic level t-sne. Default is 'TL-tsne'
if non-null, a numeric (between 0 and 1) indicating an edge threshold for the representation
a boolean indicating whether the layout of the metaweb should be used to represent the network
to use metaweb layout = T, you need first to compute metaweb layout for this beta value using attach_layout()
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()
a boolean indicating whether coordinates should be flipped. In that case, y-axis is the trophic level and x-axis is the layout axis
boolean, do not edit by hand
a two dimension numeric vector, indicating dilatation of x,y axis
configuration list for visNetwork representation, default is visNetwork.default
configuration list for mode 'TL-tsne', default is TL_tsne.default
object of class 'visNetwork', dynamic representation of the current network
library(metanetwork)
library(igraph)
data("meta_angola")
## Return htmlwidget
# on angola dataset
meta_angola = attach_layout(meta_angola, beta = 0.05)
#> attaching TL-tsne layout for metaweb_Species
#>
#> beta = 0.05
#> beta = 0.05
#> Epoch: Iteration #100 error is: 907.410775021431
#> Epoch: Iteration #200 error is: 217.139979710306
#> Epoch: Iteration #300 error is: 217.265843383911
vismetaNetwork(meta_angola, beta = 0.05)
#> x_max = 1259.92651522773
#> y_max = 349.199083729064