-1

I have 2 dataframes with a common ID. I want to merge all the columns from data frame B into data frame A, however data frame A has less rows.

merged <- merge (A, B, by = c("ID")

and I always get double rows how can I solve this? Thanks

  • 1
    Please, provide a reproducible example: [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – PaulS May 31 '22 at 08:46
  • 1
    Does this answer your question? [How to join (merge) data frames (inner, outer, left, right)](https://stackoverflow.com/questions/1299871/how-to-join-merge-data-frames-inner-outer-left-right) – Pax May 31 '22 at 08:51

0 Answers0