I have to merge 2 data files in R based on 3 variable. Is it necessary to sort both the data files by these 3 variables? Or R will be able to merge the files without sorting?
Main Data file:
`ID ` var1 var2 var3 Country  Segment Ind
 1     45   1    7      tt      tr      t
 2     55   4   6       gg      hh      h
 3     66   6    8       yy     yt      a
The data which have to merge with the Main data
   `ID `  Country  Segment Ind weight
     1      tt      yt      t   0.1
     2      yy      hh      h   0.12
     3      gg      tr      a  0.25
Based on Country segment and Ind Weight variable has to merge with the main file.
Thanks, Tanuvi
 
    