A fct that plot a visNetwork plot of a adjacency matrix or an Sbm fit from the sbm package.
# S3 method for default
visSbm(
x,
labels = "default",
node_names = NULL,
directed = "default",
settings = list()
)a visNetwork visual of the x object
Sbm model of class `BipartiteSBM_fit`, `SimpleSBM_fit` or simple numeric `matrix`.
labels for nodes. If it's simple sbm it should be a single character ("default" -> c("nodes")). If sbm is bipartite a named character (names are row and col) ("default" -> c(row = 'row', col = 'col')).
if NULL do nothing specific, but list of nodes are given the graph get interactive and nodes names are showed by clicking on a block. In bipartite case a named list:
character: node names in rows
character: node names in columns
In unipartite case a single character vector containing the nodes names (Default = NULL).
Boolean indicating whether or not the network is directed by default, a asymmetrical matrix will be seen as directed.
list of settings
List of parameters
"default" erases as many small edges as it can without isolating any nodes (no connection). It can also be a numeric value between 0 and 1, relative (between min and max) filter for small edges value
character: color of edges (default: "lightblue")
boolean: should edges be arrows
numeric: arrows size
character: "row" or "col" or labels value according to row or columns. The arrow will start from selected to the the other value
named character: Bipartite case c(row = "row_color", col = "col_color"). Unipartite case c("node_color")
named character: Bipartite case c(row = "row_shape", col = "col_shape"). Unipartite case c("node_shape"). Value from visNetwork shape argument of visEdges function ("triangle","dot","square",etc...)
integer: number of digits to show when numbers are shown (default: 2)