Skip to contents

Create number of cluster and number of hh surveyed per group/strata

Usage

create_group_clusters(
  results_table,
  analysis_key = "analysis_key",
  dataset,
  cluster_name = NULL
)

Arguments

results_table

results table with analysis key

analysis_key

String with the name of the analysis key. Default is "analysis_key"

dataset

dataset

cluster_name

String with the name of the cluster id in the dataset.

Value

A dataframe with number of HH and cluster in each group

Examples

create_group_clusters(
  results_table = presentresults_resultstable,
  dataset = presentresults_MSNA_template_data,
  cluster_name = "cluster_id"
)
#> # A tibble: 6 × 3
#>   group_var_value             number_of_cluster number_of_hh
#>   <chr>                                   <int>        <int>
#> 1 locationA %/% displaced                     2           31
#> 2 locationA %/% non-displaced                 2           24
#> 3 locationB %/% displaced                     2           27
#> 4 locationB %/% non-displaced                 2           18
#> 5 locationA                                   2           55
#> 6 locationB                                   2           45