map_checkbox_choice: Map checkbox choice to label

View source: R/dictionary.R

map_checkbox_choiceR Documentation

Map checkbox choice to label

Description

A checkbox choice is a field that can be either Checked or Unchecked. Transform this entry to the corresponding label text.

Usage

map_checkbox_choice(.x, .choices)

Arguments

.choices

Details

In REDCap, a checkbox is represented as a series of fields with the choice index appended. That is, it is of the form

checkbox___1

The data dictionary (metadata) provides a lookup of what 1 is labeled. The content of the field is NA, Checked or Unchecked.

This function will take a column of data from a tibble assumed to be in checkbox form. It requires a tibble of choices, to map the Checked value to a corresponding Label value.


steveneschrich/pgreportr documentation built on Jan. 13, 2025, 7:09 p.m.