find_non_reference_row: Find non-reference row for binary variable condensing

View source: R/forest_utils.R

find_non_reference_rowR Documentation

Find non-reference row for binary variable condensing

Description

Identifies the non-reference row in a binary categorical variable by checking for NA estimates (reference rows have NA). This is more robust than assuming row position or matching specific strings like "Yes" or "Positive".

Usage

find_non_reference_row(var_rows, estimate_col = "estimate")

Arguments

var_rows

Data.table containing rows for a single variable.

estimate_col

Character string naming the estimate column (e.g., "estimate", "coef"). Default is "estimate".

Value

Integer index of the non-reference row within var_rows, or NULL if cannot be determined (e.g., no NA estimates found, or multiple non-NA rows).


summata documentation built on May 7, 2026, 5:07 p.m.