odk_create_location_choices: Create location choices

Description Usage Arguments Value

View source: R/odk_create_location_choices.R

Description

Generate cascading options for location choices appropriate for the correct location hierarchy in ODK

Usage

1
2
3
4
5
6
7
8
9
odk_create_location_choices(
  country = NULL,
  add_other = TRUE,
  add_ids = FALSE,
  add_codes = TRUE,
  other_word = "Other",
  other_only_levels = c("Village", "Hamlet"),
  lower_it = TRUE
)

Arguments

country

Which country to use. If NULL (the default), both will be used.

add_other

Whether to add an "other" option

add_ids

Whether to add an ID section. Defunct. Keep as FALSE

add_codes

Whether to add the hamlet code. TRUE as default

other_word

The name of the word to be used to mark "Other"

other_only_levels

Whether the other option should be applied only to certain geographical levels. If NULL, all levels get an "other" option. Otherwise, only the named vector.

lower_it

Whether to lowercase the names of the levels (ie "village", not "Village"). Default is False

Value

A list of two tables named "survey" and "choices"


databrew/seroprevalence documentation built on Aug. 26, 2020, 12:03 a.m.