Merge files with multiple submissions in the second dataframe error (by.y, y) : 'by' must specify a uniquely valid column

Hello,
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

Seems to me you are being inconsistent as to whether there is an underscore in the name or a space

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.