Categorical data from Kobo to R

Thanks for this wroos

1 Like

@dickoa I have been investigating the issue further. Given that it was a long form I found a misplaced bracket “)” in the names column in the choices sheet. I removed it and redeployed the xlsform but still can’t get the data.

@Sticks that part is normal, it’s because the package loads all the version of the forms by default.
Can you try with all_version set to FALSE.

kobo_data(uid, all_version = FALSE)

If it’s working, I can push a fix. Can you share the choice with the misplaced bracket ?

1 Like

For those who continue to struggle with the labels on data imported via robotoolbox package, a simple fix is to first load the data as usual…

#import data from Kobo
data_eng ← kobo_asset(“xxxxxxxxxxxxxxxxxxxx”)
data_eng ← kobo_data(data_eng, lang = “English”)

#install “labelled” package

load the data with labels

data_eng_labelled ← to_factor(data_eng)

Hope this is helpful.

1 Like