Package for comparing two XLSForm Docs. Currently designed for use with SurveyCTO XLSForm files but should be usable or modifiable for use with ODK forms.
Download the library from Github:
devtools::install_github("williameoswald/compareXLSForms")
Load libraries:
library("compareXLSForms")
library("tidyverse")
library("readxl")
library("flextable")
Please ensure the "label", "hint", "constraint message" columns are named "label:English", "hint:English", and "constraint message:English". Additional language columns (only one additional language at a time for now) can be examined by specifying them as a third argument according to how the language is named in the form (e.g. "Francais" for label:Francais).
form1location <- "filepath to first XLSForm here"
form2location <- "filepath to second XLSForm here"
# Name output of function "full_compare""
full_compare <- compare_survey(form1location,form2location,language)
- Compare content - list items not present in both survey sheets
- Get row number for each item in form 1 relative to same item's position in form 2
- Compare type per name
- Compare calculation fields for calculate items
- Compare all constraint fields
- Compare all relevance fields
- Compare English labels
- Compare English constraint messages
- Compare English hints
- Compare Other language labels
- Compare Other language constraint messages
- Compare Other language constraint messages
tabulate_comparison(1)
tabulate_comparison(2)
tabulate_comparison(3)
tabulate_comparison(4)
tabulate_comparison(5)
tabulate_comparison(6)
tabulate_comparison(7)
tabulate_comparison(8)
tabulate_comparison(9)
tabulate_comparison(10)
tabulate_comparison(11)
tabulate_comparison(12)
- Add comparison of choices tab
- Make cleaner output
- Functionalise repeated actions
Please contact me with any questions or suggestions.
Available for use under a CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).