How to merge two CSV file by a specific column using R



I am currently solving one classification problem in which I have three different CSV files in which there is more than one column which is common between two files when I have used the function merge by rows are getting less.So I want to know is there a way by which I can join two CSV file by specifying the common column.


Hi @sid100158

Check the package dplyr you have all the join_XXX function it will solve your problem




You can use plyr and dplyr package for this thing.
Use join function from it.
Ex - join(df1,df2,by=“id”)
Hope that helps. :slightly_smiling:


Play with all.x and all.y parameters in merge() function, you’ll find a solution. :slight_smile: