Typically, when you merge data frames you're looking to bring together different columns.
In this case, you probably want to isolate the common column names and check if they have the same information. For those identical columns, identify them and only merge from x to prevent redundant information.
common <- setdiff(intersect(names(x), names(y)), "id")
iden <- sapply(common, function(mycol) identical(x$mycol, y$mycol))
cors <- sapply(common, function(mycol) identical(x[, mycol], y[, mycol]))
z <- merge(
# merge of different columns
merge(
x[, setdiff(names(x), common[iden]],
y[, setdiff(names(y), common[iden]],
by = "id"
),
# merge of common columns
x[, c("id", common[iden])],
by = "id"
)