Description Usage Arguments Value Author(s) Examples
This function display the surveyors who picked up less than a specified amount of answers per specific question. This can be useful for select_multiple questions where respondent shall give at least 3 options for instance.
1 2 3 4 5 | enumeratorIsLazy(
ds = NULL,
enumeratorID = NULL,
questionsEnumeratorIsLazy = NULL
)
|
ds |
dataset containing the survey (from kobo): data.frame |
enumeratorID |
name of the field where the enumerator ID is stored: string |
questionsEnumeratorIsLazy |
columns name from the dataset and value you want to check against (c(col1=value1,col2=value2,...)): named list of integer the column name is the main part of the name generated by kobo (eg: for the question 'main_income', kobo will generate one TRUE/FALSE column per possible answer as 'main_income.work', 'main_income.remittance'..., only the main part 'main_income' has to be specified here) |
dst same dataset as the inputed one but with survey marked for deletion if errors are found and delete=TRUE (or NULL)
ret_log list of the errors found (or NULL)
var a list of value (or NULL)
graph graphical representation of the results (or NULL)
Yannick Pascaud
1 2 3 4 5 6 7 8 9 10 11 12 13 | {
ds <- HighFrequencyChecks::sample_dataset
enumeratorID <- "enumerator_id"
questionsEnumeratorIsLazy <- c(consent_received.shelter_nfi.non_food_items=3,
consent_received.food_security.main_income=3,
consent_received.child_protection.boy_risk=3,
consent_received.child_protection.girl_risk=3)
list[dst,ret_log,var,graph] <- enumeratorIsLazy(ds=ds,
enumeratorID=enumeratorID,
questionsEnumeratorIsLazy=questionsEnumeratorIsLazy)
head(ret_log,10)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.