I had two data sets
df1 has columns A,B,C
df2 has columns D,E,F
I merged the two data sets using:
facilitylist <- merge.default(df1, df2, all = TRUE)
I have two rows with the same value in the first column. The first row has columns A,B,C populated and D,E,F blank. The second row has A,B,C blank and D,E,F populated.
Example :
COLUMNS: x A B C D E F
ROW 1 5 H J K
ROW 2 5 L M N
This trend is repeating. How do I combine these two rows? *** these are character vectors***
- cbind does not work because the two df have different number of elements
- rbind says names do not match
- group_by is for lists, not characters