If you’re using kf.kobotoolbox.org or kobo.humanitarianresponse.info, you probably have the latest version of KPI.
I created a form change_select_one_choices_v1.xlsx
, collected 3 submissions and then changed the choices, and saved it as change_select_one_choices_v2.xlsx
to collect 2 submissions.
library(tidyverse)
library(robotoolbox)
library(labelled)
uid <- "aswdwD1123rfcvssS13"
df <- kobo_data(uid)
glimpse(df)
## Rows: 4
## Columns: 16
## $ start <chr> "2023-05-19T15:41:14.464-00:00", "2023-05-19T15:41:03.130-00:00", "…
## $ end <chr> "2023-05-19T15:41:24.887-00:00", "2023-05-19T15:41:14.447-00:00", "…
## $ today <chr> "2023-05-19", "2023-05-19", "2023-05-19", "2023-05-19"
## $ full_name <chr> "Aicha", "Fatma", "Ali", "Ahmadou"
## $ pet_type <chr+lbl> "2", "4", "3", "1"
## $ vaccinated <chr+lbl> "3", "2", "1", "2"
## $ `_id` <int> 29098275, 29098272, 29098265, 29098264
## $ uuid <chr> "485f4004b28244228b674674a553e412", "485f4004b28244228b674674a553e4…
## $ `__version__` <chr> "vTbjhgntR6d4h6ZvWahofi", "vTbjhgntR6d4h6ZvWahofi", "vKdkehR7oT9pse…
## $ instanceID <chr> "uuid:f673e00c-682f-4e1c-bc10-0f21eb612de7", "uuid:6839306a-7ed…
## $ `_xform_id_string` <chr> "a9Di9WtdgzLr6TZUMH4jWh", "a9Di9WtdgzLr6TZUMH4jWh", "a9Di9Wtdgz…
## $ `_uuid` <chr> "f673e00c-682f-4e1c-bc10-0f21eb612de7", "6839306a-7ed6-486b-a661-5f…
## $ `_status` <chr> "submitted_via_web", "submitted_via_web", "submitted_via_web", "sub…
## $ `_submission_time` <chr> "2023-05-19T15:41:33", "2023-05-19T15:41:24", "2023-05-19T15:39:55"…
## $ `_validation_status` <int> NA, NA, NA, NA
## $ `_submitted_by` <int> NA, NA, NA, NA
df$pet_type
## <labelled<character>[4]>: What's your favorite pet in this list?
## [1] 2 4 3 1
## Labels:
## value label
## 1 lapin
## 2 poulet
## 3 chien
## 4 chat
## 5 tortue
to_character(df$pet_type)
## [1] "poulet" "chat" "chien" "lapin"
As you can see (see attached), in the first form, I had chicken
, cat
, dog
, turtle
and rabbit
but even for the 3 first submissions that used v1, I have the label of v2. I’m sure I’m missing something, but with this simple example, I can’t reproduce it.
change_select_one_choices_v1.xlsx (10.1 KB)
change_select_one_choices_v2.xlsx (10.1 KB)