I want to merge variables with the same name so values from the y dataset overwrite those in the x datatset.
This code should produce a replica of b because a$V2 should be overwritten by b$V2.
Instead I get V2.x and V2.y
a = data.frame(c("A","B","C","D"), c("1","2"))
names (a) = c("V1","V2")
b = data.frame(c("A","B","C","D"), c("3","4"))
names (b) = c("V1","V2")
merge.data.frame(a,b, by.x = "V1", by.y = "V1", all.y = T,)