track_outcomes: Attach outcome counts to the current leaves (CONSORT...

View source: R/10_flow.R

track_outcomesR Documentation

Attach outcome counts to the current leaves (CONSORT flowchart)

Description

Adds one or more outcome variables, counted within each current leaf (combination of all splits so far). Outcomes are stacked, not branched. Each outcome is treated as binary: counts how many individuals have value == 1 (or TRUE), plus the percentage within the leaf.

Usage

track_outcomes(sdf, vars, labels = NULL)

Arguments

sdf

A Spark DataFrame or local data frame.

vars

Character vector of outcome column names (binary 0/1 or logical).

labels

Optional named list (var -> label).

Value

sdf unchanged (for piping).


autocodebook documentation built on June 9, 2026, 1:09 a.m.