Returns a data frame of subject events with missing values.
missingSummary(
rcon,
excludeMissingForms = TRUE,
...,
fixed_fields = REDCAP_SYSTEM_FIELDS
)# S3 method for redcapApiConnection
missingSummary(
rcon,
excludeMissingForms = TRUE,
...,
fixed_fields = REDCAP_SYSTEM_FIELDS,
exportRecordsArgs = list(),
bundle = getOption("redcap_bundle"),
error_handling = getOption("redcap_error_handling")
)
missingSummary_offline(
records,
meta_data,
excludeMissingForms = TRUE,
fixed_fields = REDCAP_SYSTEM_FIELDS
)
A redcapConnection
object.
logical(1)
If all of the fields in a form are missing, would
you like to assume that they are purposefully missing? For instance, if
a patient did not experience an adverse event, the adverse event form would
contain no data and you would not want it in this report.
Additional arguments to pass to other methods. Currently ignored.
character
A vector of field names that will be used as
the identifying fields in the output summary. This always includes the record
identifier (ie, the first field in the data dictionary). By default it
also includes any fields identified in REDCAP_SYSTEM_FIELDS
, which
are fields that REDCap adds to exports to identify arms, events, etc.
see constants
.
named list
with arguments to pass to exportRecords
.
This allows for testing specific forms, events, and/or records. Internally, any
setting you make for factors, labels, dates, survey
, or dag
arguments will be ignored.
A redcapBundle
object as created by exportBundle
.
An option for how to handle errors returned by the API.
see redcap_error
character(1)
A filename pointing to the raw records download from REDCap
character(1)
A filename pointing to the data dictionary download from REDCap
Benjamin Nutter
The intention of this function is to generate a list of subject events that are missing and could potentially be values that should have been entered.
The branching logic from the data dictionary is parsed and translated into
and R expression. When a field with branching logic passes the logical
statement, it is evaluated with is.na
, otherwise, it is set to
FALSE
(non-missing, because there was never an opportunity to
provide a value).
Optionally, forms that are entirely missing can be determined to be non-missing. This is applicable when, for instance, a patient did not have an adverse event. In this case, a form dedicated to adverse events would contain meaningless missing values and could be excluded from the report.