odk_to_coding {rcoder} | R Documentation |
Convert ODK choices to a coding
Description
ODK XLSForms link the categorical codings to a variable type name in the 'survey' sheet. The codings are specified in the 'choices' sheet which has a 'list_name' column that holds the variable type names. Each row that has that name will be associated with that categorical type coding. This function converts subsets of the choices sheet into individual 'coding' objects.
Usage
odk_to_coding(choice_table)
Arguments
choice_table |
A data.frame slice of the "choices" table from an XLSForm |
Value
A ‘coding' object that corresponds to the choices’ slice
See Also
[coding_to_odk()]
Examples
choice_excerpt <- data.frame(
list_name = rep("yesno", 2),
name = c("Yes", "No"),
label = c(1, 0)
)
odk_to_coding(choice_excerpt)
[Package rcoder version 0.3.0 Index]