Skip to contents

Creates modern flowcharts using ggflowchart package with ggplot2 styling. This module provides an alternative flowchart approach using the ggflowchart package for creating publication-ready flowcharts with ggplot2 aesthetics. Complements the existing DiagrammeR-based flowchart module with modern ggplot2 integration and customizable styling options.

Usage

ggflowchart(
  data,
  from_var,
  to_var,
  group_var,
  node_fill_palette = "clinical_blue",
  plot_title = "Study Flowchart",
  show_interpretation = TRUE
)

Arguments

data

The data as a data frame.

from_var

Variable defining the starting nodes for flowchart connections.

to_var

Variable defining the ending nodes for flowchart connections.

group_var

Optional variable for grouping nodes by categories.

node_fill_palette

Color palette for node filling.

plot_title

Title for the flowchart.

show_interpretation

If TRUE, displays usage guidelines.

Value

A results object containing:

results$todoa html
results$plotan image
results$interpretationa html

Examples

# \donttest{
# Example:
# 1. Prepare data with 'from' and 'to' node connections.
# 2. Customize with ggplot2-style themes and colors.
# 3. Generate modern flowcharts with publication quality.
# }