Creates an hv_consort_tracker object with one row per patient and a
boolean column indicating that every patient is in the initial (screened)
population. Build the tracker incrementally with hv_consort_exclude(),
then convert to a diagram with hv_consort().
Arguments
- data
A data frame – one row per patient.
- patient_id
<
data-masking> Unquoted name of the unique patient identifier column.- label
Character label for the initial population box. Default
"Screened".- pass_col
Column name for the initial boolean column. Defaults to
ct_snakify(label)(e.g."screened"whenlabel = "Screened").
Value
An hv_consort_tracker object – a list with:
$dataPatient-level data frame with boolean/character columns appended per stage.
$stagesOrdered list of stage descriptors (
label,include_col,excl_col,excl_label).$patient_id_colColumn name of the patient identifier.
Examples
cohort <- data.frame(mrn = paste0("P", 1:100), age = sample(15:80, 100, TRUE))
tracker <- hv_consort_start(cohort, patient_id = mrn)
print(tracker)
#> <hv_consort_tracker>
#> Patients : 100
#> ID column : mrn
#> Stages : 1
#> [screened] Screened -- N = 100