This function provide a report showing all distinct other values and the number of occurrences for each fields "other". This report can be global (all the surveys) or displayed for each enumerator ID

surveyOtherValues(
  ds = NULL,
  otherPattern = NULL,
  enumeratorID = NULL,
  enumeratorCheck = FALSE
)

Arguments

ds

dataset containing the survey (from kobo): data.frame

otherPattern

patternto identify the fields containing others values (eg: '_other$'): string

enumeratorID

name of the field where the enumerator ID is stored: string

enumeratorCheck

(Optional, by default set to FALSE) specify if the report has to be displayed for each enumerator or not: boolean (TRUE/FALSE)

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 otherPattern <- "_other$" enumeratorID <- "enumerator_id" list[dst,ret_log,var,graph] <- surveyOtherValues(ds=ds, otherPattern=otherPattern, enumeratorID=enumeratorID, enumeratorCheck=FALSE) head(ret_log,10) }
#> # A tibble: 10 x 3 #> # Groups: field [2] #> field values nb #> <fct> <chr> <int> #> 1 consent_received.wash.water_collec~ "The source is only available some~ 1 #> 2 consent_received.wash.water_collec~ "They have to collect water from n~ 1 #> 3 consent_received.shelter_nfi.non_f~ "chair-table " 1 #> 4 consent_received.shelter_nfi.non_f~ "Cow, goat " 1 #> 5 consent_received.shelter_nfi.non_f~ "Dressmaking machine" 1 #> 6 consent_received.shelter_nfi.non_f~ "Electric fan" 1 #> 7 consent_received.shelter_nfi.non_f~ "Electricity line" 2 #> 8 consent_received.shelter_nfi.non_f~ "Electricity supply \n" 1 #> 9 consent_received.shelter_nfi.non_f~ "Fridge" 1 #> 10 consent_received.shelter_nfi.non_f~ "Furniture" 1