Description Usage Arguments Details Value See Also Examples
View source: R/closure_defaults.R
Uses a loaded kobo questionnaire to look up the question type for a given question.
| 1 | question_is_numeric(question.name)
 | 
| question.name | The xml name of a kobo question as a string. (as it appears in the kobo questionnaire and subsequently in the data column headers) | 
To use this you must first successfully run load_questionnaire.
This does not derive the data type from any actual data; it only looks up the type defined in the questionnaire.
If type identification fails, the default return value is FALSE.This happens in the following cases:
 No questionnaire has been loaded with load_questionnaire
question.name could not be found in the questionnaire, or in the data that was supplied to load_questionnaire
TRUE if the question is listed as a numeric type in the questionnaire. FALSE if the question is listed as a different type. FALSE if the question type could not be determined from the questionnaire.
load_questionnaire must be run first.
Use question_type for the most generalised way to guess the data type.
Part of the question_is_* family of functions:
testing for specific types:
question_is_numeric,
question_is_categorical,
question_is_select_one,
question_is_select_multiple,
question_is_sm_choice
parsing kobo skip-logic:
question_is_skipped
| 1 2 3 | question_is_numeric("some_numeric_kobo_xml_question_name") # TRUE
question_is_numeric("some_categorical_kobo_xml_question_name") # FALSE
question_is_numeric("some_unidentified_string") # FALSE
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.