Skip to contents

Finalizes the STROBE diagram by branching into terminal inclusion nodes based on the values of a factor variable (e.g., outcome or stratifying variable). The function throws an error if variable has more than six levels (including NA).

Usage

create_terminal_branch(data, variable, label_prefix = NULL)

Arguments

data

A data frame being tracked by STROBE.

variable

A factor or character variable to split by.

label_prefix

Optional prefix to prepend to each level in the inclusion label.

Value

The input data frame (unchanged).