Unnest previously fetched form definitions
Source:R/scto_get_form_metadata.R
scto_unnest_form_definitions.RdThis function unnests form definitions, e.g., from multiple versions of a form, which can make it easier to map values to labels in a later step.
Arguments
- form_metadata
data.tablereturned byscto_get_form_metadata().- by_form_id
Logical indicating whether to unnest definitions of multiple versions of a given form (default), or to unnest definitions of all forms together.
Value
If by_form_id is TRUE, a data.table of data.tables for the
survey, choices, and settings components of the form definitions. Otherwise
a list of data.tables.
Examples
if (FALSE) { # \dontrun{
auth = scto_auth('scto_auth.txt')
form_metadata = scto_get_form_metadata(auth, 'my_form')
form_defs = scto_unnest_form_definitions(form_metadata)
} # }