0

I have 2 data set with id's and am trying to merge them with R, without losing any rows.

I am using the merge function

merge(x,y,"id")

I am not getting all the rows. I have less, why?

What is the correct function to do this operation?

M.Viking
  • 5,067
  • 4
  • 17
  • 33
memile
  • 9
  • 3
  • Hi, maybe you want `dplyr::full_join()`. – M.Viking Oct 17 '19 at 18:01
  • Hi memile, please post a minimum reproducible example so it is easy for us here to cut and paste your code into our own R sessions, get at least a subset of your two data sets, and be able to reproduce your effort and confirm a solution. thanks :) – mysteRious Oct 17 '19 at 20:31
  • `merge(x = x, y = y, by = "id", all = TRUE)` https://stackoverflow.com/questions/1299871/how-to-join-merge-data-frames-inner-outer-left-right – M.Viking Oct 17 '19 at 22:55

0 Answers0