check_redcap_populated function

Check that a supplied REDCap database is populated

Check that a supplied REDCap database is populated

Check for potential outputs where metadata is present, but nrow and ncol equal 0. This causes multi_choice_to_labels to fail, but a helpful error message should be provided.

check_redcap_populated(db_data, call = caller_env())

Arguments

  • db_data: The REDCap database output generated by REDCapR::redcap_read_oneshot()$data
  • call: the calling environment to use in the error message

Returns

A helpful error message alerting the user to check their API privileges.