Joining columns of two data frames column-wise

Hi all,

I am a beginner in R, and this is my first post in RStudio community. I want to concatenate two data frames in R column-wise. I tried full_join function of the dplyr package but the rows are repeated. In both the data frames the date column is common.

Any kind of help/suggestion will be highly appreciated.

Regards
John

About join and relational data, you can take a look at R for DataScience chapter on it

Know that you have several verbs inner_join, full_join, right_join, left_join, semi_join, anti_join that depends how you want ot join your table. The book gives a nice introduction to those.

Also, if you us to help you with your example, you need to provide some data sample and code. A reproductible example would be perfect. (see reprex)

Hi cderv,

Thanks for your suggestions and the book link.

I solved my problem now using cbind function.

Thanks
John

Glad to here it is solved. I know you can set the question as resolved but don't know how.
@mara could help us on that.

Know that in dplyr you have also the bind_cols function that could be useful for you.

@cderv, Thanks for the suggestion. The bind_cols function does the same work for me as cbind function.

Regards
John

1 Like

Looks like @johnn figured it out :+1:! FFR, I explain how to mark a solution here:

2 Likes