Skip to contents

Generate a log for other follow up questions

Usage

check_others(dataset, uuid_column = "uuid", columns_to_check = NULL)

Arguments

dataset

dataset to be check as a dataframe or a list with the dataframe stored as "checked_dataset"

uuid_column

uuid column in the dataset. Default is "uuid".

columns_to_check

Columns to include in the checks

Value

a log with all the values that may require recoding

Examples

check_others(
  dataset = cleaningtools::cleaningtools_clean_data,
  uuid_column = "X_uuid",
  columns_to_check = names(cleaningtools::cleaningtools_clean_data |>
    dplyr::select(ends_with("_other")) |>
    dplyr::select(-contains(".")))
)
#> $checked_dataset
#> # A tibble: 578 × 350
#>    X.U.FEFF.start    end   date_assessment deviceid enumerator_num neighbourhood
#>    <chr>             <chr> <chr>           <chr>             <int> <chr>        
#>  1 2021-07-12T00:47… 2021… 2021-07-12      collect…             15 ofhfyt       
#>  2 2021-07-13T11:25… 2021… 2021-07-13      collect…             16 ytjhfsd2     
#>  3 2021-07-13T12:36… 2021… 2021-07-13      collect…             16 ytjhfsd2     
#>  4 2021-07-13T10:21… 2021… 2021-07-13      collect…              8 ytjhfsd2     
#>  5 2021-07-13T10:54… 2021… 2021-07-13      collect…              8 ytjhfsd2     
#>  6 2021-07-13T11:18… 2021… 2021-07-13      collect…             13 ytjhfsd2     
#>  7 2021-07-13T12:36… 2021… 2021-07-13      collect…             13 ytjhfsd2     
#>  8 2021-07-13T13:21… 2021… 2021-07-13      collect…             13 ytjhfsd2     
#>  9 2021-07-07T10:45… 2021… 2021-07-07      collect…              1 rfbv_1       
#> 10 2021-07-07T11:47… 2021… 2021-07-07      collect…              1 rfbv_1       
#> # ℹ 568 more rows
#> # ℹ 344 more variables: consent_remote <chr>, hhh_r <chr>,
#> #   will_to_response_r <chr>, age_respondent_r <int>, age_hoh <int>,
#> #   gender_hoh <chr>, displace_status <chr>, displace_status_returnee <chr>,
#> #   return_date <chr>, num_hh_member <int>, hh_hosting <chr>,
#> #   num_hh_hosting <int>, hh_hosted <chr>, shelter_occupation <chr>,
#> #   shelter_occupation_other <chr>, property_title <chr>, …
#> 
#> $other_log
#> # A tibble: 46 × 4
#>    uuid                                 question                 old_value issue
#>    <chr>                                <chr>                    <chr>     <chr>
#>  1 630d0067-d84a-4fd0-8c36-029e87913c40 primary_livelihood_other عسكري ضم… reco…
#>  2 ac98cb2b-80a9-4ee9-ba67-6fd38b0247d8 problems_water_main_com… عدم وصول… reco…
#>  3 c18fc8f9-c8b7-4ba3-8e61-4460c3604a9d problems_water_main_com… عدم وصول… reco…
#>  4 816f41ec-603e-4d5d-a284-8bdb9cbf913d problems_water_main_com… عدم وجود… reco…
#>  5 0be815d6-1f31-4d4d-8775-6043df8b9f03 problems_water_main_com… عدم وجود… reco…
#>  6 b4588be7-aa42-47de-9d00-e85ec968c1fa problems_water_main_com… عدم وجود… reco…
#>  7 55e388ed-fdf2-4d53-96b8-8c406947cad3 problems_water_main_com… عدم وجود… reco…
#>  8 44614627-c152-4f24-a3ca-87a58b2f2e3f problems_water_main_com… عدم وجود… reco…
#>  9 a537a7a3-468c-4661-8b7b-93e43e9b8a3b problems_water_main_com… لا توجد … reco…
#> 10 40d8ee6f-8e47-497a-9005-fde107b209b8 prefer_not_engage_other  لا ارى ج… reco…
#> # ℹ 36 more rows
#>