vubiostat / redcapAPI

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

support missing cbox in missingSummary #403

Open couthcommander opened 4 months ago

couthcommander commented 4 months ago

issue #349

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
spgarbet commented 4 months ago

Hm. I would say one.

spgarbet commented 4 months ago

@mcfibb Thoughts?

mcfibb commented 4 months ago

Hey! Thanks for asking for my input. I would say count as "1 Missing Value". The question is the unit, not the options. Make sense?