coding_to_odk: Convert a coding object to ODK XLSForm choices

View source: R/interop.R

coding_to_odkR Documentation

Convert a coding object to ODK XLSForm choices

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 'coding' objects into tables that can be inserted into that 'choices' sheet. The categorical type is specified with the coding '.label'.

Usage

coding_to_odk(coding)

Arguments

coding

A coding object

Value

A data.frame or tibble that can be included in an XLSForm 'choices' sheet

See Also

[odk_to_coding()]

Examples

cdng <- coding(code("Yes", 1), code("No", 0), .label = "yesno")
coding_to_odk(cdng)

rcoder documentation built on Oct. 6, 2023, 9:06 a.m.