| Title: | Create random data for xlsform questionnaires |
|---|---|
| Description: | Create fake data for an xlsform for testing purposes |
| Authors: | Martin Barner |
| Maintainer: | Martin Barner <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-06-12 06:18:38 UTC |
| Source: | https://github.com/mabafaba/xlsformfill |
generate data for an xlsform
xlsform_fill(questions, choices, n)xlsform_fill(questions, choices, n)
questions |
the xlsform questions sheet as data frame |
choices |
the xlsform choices sheet as a data frame |
n |
the number of rows to generate |
create sampling frame from kobo tool
xlsform_generate_samplingframe(choices, strata_list_names)xlsform_generate_samplingframe(choices, strata_list_names)
choices |
the kobo questionnaire choices sheet as a data.frame |
strata_list_names |
the choice list_name column values of the variables that together uniquely define each stratum |
a data frame with two columns: "strata": the names of the strata; all unique combinations of the choices in each provided strata list name, concatenated by two underscores ("__") "population": randomly generated population for each stratum (lognormal distribution with meanlog 10 and sdlog 1)