Question: (Closed) Joining multiple columns from different dataframes in R
0
gravatar for mb314
11 months ago by
mb31410
mb31410 wrote:

I have 8 dataframes, each with two columns: one with nucleotide position (NT) and the other with count of how many times that position occurred. ex: data.frame("NT" = c("1","2","3"), "count" = c("34", "12", "17"))

I'm trying to join all 8 of these dataframes into one dataframe whereby my columns are: NT, count_sample1, count_sample2, count_sample3 etc.

I've tried using R's merge() function and dplyr's full_join() function, but can only join two at a time. Is there a way I can do all 8 with one command?

dplyr R • 279 views
ADD COMMENTlink written 11 months ago by mb31410

No, merge and full_join work with two at a time. But searching would take you to some hits, like How to merge multiple data frames using base R.

ADD REPLYlink written 11 months ago by h.mon29k

Hello mb314!

We believe that this post does not fit the main topic of this site.

More suitable to StackOverflow, and this type of questions been asked many times before:

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink modified 11 months ago • written 11 months ago by zx87549.0k
Please log in to add an answer.
The thread is closed. No new answers may be added.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1530 users visited in the last hour