combine_and_repair_tbls: Combine checkbox fields with respect to repaired outputs

View source: R/combine_checkboxes.R

combine_and_repair_tblsR Documentation

Combine checkbox fields with respect to repaired outputs

Description

This function seeks to preserve the original data columns and types from the originally supplied data_tbl and add on the new columns from data_tbl_mod.

If names_repair presents a repair strategy, the output columns will be captured and updated here while dropping the original columns.

Usage

combine_and_repair_tbls(data_tbl, data_tbl_mod, new_cols, names_repair)

Arguments

data_tbl

The original data table given to combine_checkboxes()

data_tbl_mod

A modified data table from data_tbl

new_cols

The new columns created for checkbox combination

names_repair

What happens if the output has invalid column names? The default, "check_unique" is to error if the columns are duplicated. Use "minimal" to allow duplicates in the output, or "unique" to de-duplicated by adding numeric suffixes. See vctrs::vec_as_names() for more options.

Value

a tibble


REDCapTidieR documentation built on April 3, 2025, 10:50 p.m.