vubiostat / redcapAPI

R interface to REDCap (http://www.project-redcap.org/)
21 stars 27 forks source link

Issue 349 cond cbox #402

Closed couthcommander closed 4 months ago

couthcommander commented 4 months ago

Count checkbox as missing when it is displaying under branching logic and no items are selected.

Consider the scenario with a checkbox group defined by five choices. If none are selected, is that five missing values or one? What is the desired output?

> missingSummary(rcon)
  record_id redcap_repeat_instrument redcap_repeat_instance n_missing                                                                     missing
1         1                     <NA>                   <NA>         6 notes, earlybed___1, earlybed___2, earlybed___3, earlybed___4, earlybed___5

> missingSummary(rcon)
  record_id redcap_repeat_instrument redcap_repeat_instance n_missing         missing
1         1                     <NA>                   <NA>         6 notes, earlybed

> missingSummary(rcon)
  record_id redcap_repeat_instrument redcap_repeat_instance n_missing         missing
1         1                     <NA>                   <NA>         2 notes, earlybed
couthcommander commented 4 months ago

This PR has a bunch of stuff I did not intend to include. Will try again