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.

enumeratorIsLazy(
  ds = NULL,
  enumeratorID = NULL,
  questionsEnumeratorIsLazy = NULL
)

Arguments

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)

Value

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)

Author

Yannick Pascaud

Examples

{ 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) }
#> enumeratorID NbErr field #> 1 1 2 consent_received.child_protection.girl_risk #> 2 3 2 consent_received.child_protection.girl_risk #> 3 6 2 consent_received.child_protection.girl_risk #> 4 12 6 consent_received.child_protection.girl_risk #> 5 13 4 consent_received.child_protection.girl_risk #> 6 14 6 consent_received.child_protection.girl_risk #> 7 16 3 consent_received.child_protection.girl_risk #> 8 18 8 consent_received.child_protection.girl_risk #> 9 19 5 consent_received.child_protection.girl_risk #> 10 24 3 consent_received.child_protection.girl_risk