I am trying to merge two data frames from ODK, the first is a household register and the second one is a repeat household register that contains information on the individual members of the family. The variable that links the two dataframes is
PARENT KEY. However, using the logic of the repeat household register, this means that one submission in the main form (household register) is having multiple submissions in the repeat form.
How would I proceed to merge these two dataframes?
Below is the codes I have used:
family_repeats_merged <- merge(family_register_repeats, family_register, by = "PARENT_KEY") %>% select(`PARENT KEY`, `today`, `data_type-type_of_submission`)
The results (error message I get is):
Error in fix.by(by.y, y) : 'by' must specify a uniquely valid column