.mcee_check_binary_col: Validate binary column coding
Description
Validate binary column coding
Usage
.mcee_check_binary_col(data, col, allow_all1 = TRUE, label = NULL)
Value
Invisibly TRUE if valid, otherwise stops with error
Arguments
- data
Data frame containing the column
- col
Column name (can be NULL, in which case validation is skipped)
- allow_all1
Logical; if FALSE, column cannot be all 1s
- label
Optional descriptive label for error messages