Skip to contents

This function display the number of errors made by the enumerator, one graph is generated by enumerator showing for each

Usage

enumeratorErrorsSummary(enumeratorID = NULL, reports = NULL)

Arguments

enumeratorID

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

reports

reports names generated from the other checks included in this package, be sure when you choose the columns to be included in each report generated that the enumeratorID is selected before including the report as a parameter to this function: list of string(c(report1,report2,...))

surveyConsent

name of the field in the dataset where the survey consent is stored: string

consentForValidSurvey

value defined in the kobo form to acknowledge the surveyed person gave his consent: string

Value

result a list that includes: * 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)

Examples


# enumeratorID <- "enumerator_id"
# reports <- c( "isInterviewCompleted",
#               "isInterviewInTheCorrectSite",
#               "isInterviewTooShort",
#               "isInterviewTooShortForTheHouseholdSize",
#               "isInterviewWithConsent",
#               "isSurveyEndBeforeItStarts",
#               "isSurveyMadeInTheFuture",
#               "isSurveyOnMoreThanADay",
#               "isSurveyStartedBeforeTheAssessment",
#               "isuniquerespondantIDDuplicated",
#               "isuniquerespondantIDMissing")
# 
# result <- enumeratorErrorsSummary(enumeratorID=enumeratorID,ds = ds,
                                      # surveyDate=surveyDate,
                                      # dateFormat=dateFormat,
                                      # surveyConsent=surveyConsent
#                                     reports=reports)
# print(result[["graph"]])