Creates a formatted node table for visualisation with visNetwork. Includes styling and formatting for interactive network display.
Usage
visNetwork_nodes(
mcmodule,
variate = 1,
color_pal = NULL,
color_by = NULL,
inputs = FALSE,
percentages = TRUE
)Arguments
- mcmodule
(mcmodule object). Module containing network structure.
- variate
(positive integer). Variate (row) to extract. See
get_node_table()for how this applies to modules with multiple data frames. Default: 1.- color_pal
(character vector, optional). Custom colour palette for nodes. Default: NULL.
- color_by
(character, optional). Column name to determine node colours. Default: NULL.
- inputs
(logical). If TRUE, include non-node inputs. Default: FALSE.
- percentages
(logical). If TRUE, eligible nodes are displayed as percentages; if FALSE, all nodes are displayed as numbers. Default: TRUE.
Value
A data frame formatted for visNetwork with columns: id, label, color, grouping, expression, and title (hover text).
