I have 4 data sets that aren't the same size. The datasets of some overlapping data that I want to merge into the same column but each dataset also has some unique data that I was to keep as well. Maybe it will make a bit more sense with an example.
Glucose Fructose Ox_Phos
CACNA1I PIK3CA FYN
PLCB2 FGFR1 ITGA2B
CACNG1 PIK3R1 PIK3CA
CACNA2D2 PIK3C2G PIK3R1
MAP3K11 PIK3R5 PIK3R5
TCA Ox_Phos Sucrose ATP
GYG1 FYN MAP3k11 CACNA1I
NA ITGA2B CACNA2D2 ITGA2B
NA FGFR1 PIK3R5 NA
NA NA CACNG1 NA
Fructose Galactose
PIK3CA CACNG1
FGFR1 NA
PIK3R1 NA
PIK3C2G NA
PIK3R5 NA
ADP
PIK3CA
CACNG1
PIK3C2G
NA
NA
So as I said before, I am trying to merge these 4 data sets into one set of data. I want to merge columns with similar colnames but then also have the unique columns become a new column.. if that makes sense? Here is what I hope the data will look like.
Glucose Fructose Ox_Phos ADP TCA Sucrose ATP Galactose
CACNA1I PIK3CA FYN PIK3CA GYG1 MAP3k11 CACNA1I CACNG2
PLCB2 FGFR1 ITGA2B CACNG1 FYN CACNA2D2 ITGA2B NA
CACNG1 PIK3R1 PIK3CA PIK3C2G NA PIK3R5 NA NA
CACNA2D2 PIK3C2G PIK3R1 NA NA CACNG1 NA NA
MAP3K11 PIK3R5 PIK3R5 NA NA NA NA NA
NA NA MAP3k11 NA NA NA NA NA
NA NA CACNA1I NA NA NA NA NA
NA NA ITGA2B NA NA NA NA NA
NA NA FGFR1 NA NA NA NA NA
NA NA NA NA NA NA NA NA
NA PIK4CA NA NA NA NA NA NA
NA FGFR7 NA NA NA NA NA NA
NA PIK4R2 NA NA NA NA NA NA
NA PIK5C3G NA NA NA NA NA NA
NA PIK4R6 NA NA NA NA NA NA
I think this can be done easily with dplyr but I am just not sure how to keep the unique column. Thanks in advance. Any help would be amazing