transform_checkboxes {REDCapDM} | R Documentation |
Transformation of checkboxes in case of having a branching logic
Description
Inspects all the checkboxes of the study and looks if there is a branching logic. If there is one, when the logic of the branching logic is missing it directly inputs a missing to the checkbox. If checkbox_na is TRUE additionally it will put a missing when the branching logic isn't satisfied and not only when the logic is missing. If a branching logic cannot be found or the logic cannot be transcribed because of the presence of some smart variables, the variable is added in the list of the reviewable ones that will be printed.
The function will return the dataset with the transformed checkboxes along with a table that shows a summary of the results.
Usage
transform_checkboxes(data, dic, event_form = NULL, checkbox_na = FALSE)
Arguments
data |
Data frame containing data from REDCap. |
dic |
Data frame containing the dictionary read from REDCap. |
event_form |
Data frame containing the correspondence of each event with each form. |
checkbox_na |
Logical indicating if values of checkboxes that have a branching logic have to set to missing only when the branching logic is missing (if set to false) or also when the branching logic isn't satisfied (if set to true). The default is false. |