Skip to contents

This function generates a validation list to be used for data entry validation. It combines predefined validation lists with dynamically formatted choices derived from the choices and tool parameters. The resulting dataframe is intended to provide structured and valid choices for various question types.

Usage

create_validation_list(choices, tool)

Arguments

choices

A dataframe representing the Kobo choices sheet. Expected to have at least the columns list_name and name.

tool

A dataframe representing the Kobo survey sheet. Expected to have at least the columns type and name.

Value

A dataframe where each column corresponds to a choice list for a specific question. Each row contains a valid choice for the question.

Examples

# Assume choices_df and tool_df are sample dataframes that fit the expected structure.
# validation_list <- create_validation_list(choices, tool)