Generates an interactive network visualisation using visNetwork library. The visualisation includes interactive features for exploring model structure and relationships.
By default, nodes are colored as:
inputs (light blue, #B0DFF9): Input datasets, data frames, files, and columns
in_node (blue, #6ABDEB): Input nodes and scalar values
out_node (green, #A4CF96): Output nodes
filter (light purple, #E8A5E5): Filtered nodes created with
mc_filter()compare (medium purple, #D88FD5): Comparison nodes created with
mc_compare()trials_info (light orange, #FAE4CB): Trial, subset, and related information nodes
total (orange, #F39200): Total nodes created with
at_least_one()agg_total (dark orange, #C17816): Aggregated total nodes created with
agg_totals()
Usage
mc_network(
mcmodule,
variate = 1,
color_pal = NULL,
color_by = NULL,
legend = FALSE,
inputs = FALSE
)Arguments
- mcmodule
(mcmodule object). Module containing network to visualise.
- variate
(integer). Which variate to visualise. 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.
- legend
(logical). If TRUE, show colours legend. Default: FALSE.
- inputs
(logical). If TRUE, show non-node inputs. Default: FALSE.
