Compares the sample frame with the clean data
review_sample_frame_with_dataset.Rd
Compares the sample frame with the clean data
Usage
review_sample_frame_with_dataset(
sample_frame,
sampling_frame_strata_column,
sampling_frame_target_survey_column = "Total.no.of.HH",
clean_dataset,
clean_dataset_strata_column,
consent_column = "consent",
consent_yes_value = "yes"
)
Arguments
- sample_frame
A sample frame. It mush have a column for strata and another column defining the number of needed survey per strata.
- sampling_frame_strata_column
Column name for strata in the sample frame
- sampling_frame_target_survey_column
Column name defining number of survey per strata in sample frame.
- clean_dataset
Clean data
- clean_dataset_strata_column
Column name for strata in clean data
- consent_column
Dataset consent column
- consent_yes_value
Choice for consent yes
Value
a dataset with the two additional columns with the number of completed surveys and number of remaining survey.
Examples
review_sample_frame_with_dataset(
sample_frame = cleaningtools::cleaningtools_sample_frame,
sampling_frame_strata_column = "Neighbourhood",
sampling_frame_target_survey_column = "Total.no.of.HH",
clean_dataset = cleaningtools::cleaningtools_clean_data,
clean_dataset_strata_column = "neighbourhood",
consent_column = "consent_remote",
consent_yes_value = "yes"
)
#> Warning: Dataset has Collected/Renaming column already, which will be replaced.
#> Managed.by Governorate Neighbourhood Total.no.of.HH Collected Remaining
#> 1 Talafar Ninewa A1 22 22 0
#> 2 Talafar Ninewa A2 19 19 0
#> 3 Talafar Ninewa A3 5 5 0
#> 4 Talafar Ninewa A4 6 6 0
#> 5 Talafar Ninewa B1 12 12 0
#> 6 Talafar Ninewa B2 15 15 0
#> 7 Talafar Ninewa B3 5 5 0
#> 8 Talafar Ninewa B4 2 2 0
#> 9 Talafar Ninewa c 27 27 0
#> 10 Talafar Ninewa Bx1 13 13 0
#> 11 Talafar Ninewa Bx2 10 10 0
#> 12 Talafar Ninewa Bdd1 9 9 0
#> 13 Talafar Ninewa Bdd2 11 11 0
#> 14 Talafar Ninewa cc 16 16 0
#> 15 Talafar Ninewa Bcccc 11 11 0
#> 16 Talafar Ninewa Bccccccc_1 14 14 0
#> 17 Talafar Ninewa Bccccccc_2 14 14 0
#> 18 Talafar Ninewa r1 4 4 0
#> 19 Talafar Ninewa tr2 27 27 0
#> 20 Talafar Ninewa tr3 14 14 0
#> 21 Talafar Ninewa tr4 8 8 0
#> 22 Talafar Ninewa oyt 35 35 0
#> 23 Talafar Ninewa frgdf 23 23 0
#> 24 Talafar Ninewa rtrtrtr_1 18 18 0
#> 25 Talafar Ninewa rtrtrtr_2 24 24 0
#> 26 Talafar Ninewa fdfddfdfdfd_1 14 14 0
#> 27 Talafar Ninewa ofhfyt 13 13 0
#> 28 Talafar Ninewa yttytyty 6 6 0
#> 29 Talafar Ninewa ghghg 15 15 0
#> 30 Talafar Ninewa sdddddds 1 1 0
#> 31 Talafar Ninewa dddddddd 5 5 0
#> 32 Talafar Ninewa eewr 7 7 0
#> 33 Talafar Ninewa rfbv_1 11 11 0
#> 34 Talafar Ninewa rfbv_3 10 10 0
#> 35 Talafar Ninewa ftgtrh_1 13 13 0
#> 36 Talafar Ninewa ftgtrh_2 17 17 0
#> 37 Talafar Ninewa ytjhfsd1 20 20 0
#> 38 Talafar Ninewa ytjhfsd2 18 18 0
#> 39 Talafar Ninewa ytjhfsd3 7 7 0
#> 40 Talafar Ninewa dgfd 14 14 0
#> 41 Talafar Ninewa hgh 19 19 0
#> 42 Talafar Ninewa ethgfbfds 24 24 0