I want to combine these two dataframes in to one. I want to have the MCN_ID's stacked vertically and the UNS 1930 column to only be one column, not "UNS 1930.x" and "UNS 1930.y" which is what my code is currently resulting in. This is ultimately being done a large scale with multiple loops for this merge. Please help!
test1 <- data.frame("AABB", 1)
colnames(test1)[1] <- "MCN_ID"
colnames(test1)[2] <- "UNS 1930"
test2 <- data.frame("BBAA", 23)
colnames(test2)[1] <- "MCN_ID"
colnames(test2)[2] <- "UNS 1930"
test3 <- full_join(test1, test2, by = "MCN_ID")
Gives this result:
MCN_ID UNS 1930.x UNS 1930.y
AABB 1 NA
BBAA NA 23
But I want this:
MCN_ID UNS 1930
AABB 1
BBAA 23