Question: Merging more than 2 csv files in r studio?
0
gravatar for oqp5041
3.8 years ago by
oqp50410
oqp50410 wrote:

Hello!

How do i merge more than two csv files in r studio based on gene_id and log2.fold_change? Is there a easy code or package for it? Thank you.

tutorial merge csv R • 3.0k views
ADD COMMENTlink modified 3.8 years ago by Devon Ryan93k • written 3.8 years ago by oqp50410

I believe the standard way to do this is by successively merging into a resulting dataframe. That is, if you wish to merge e.g. [1,2,3,4,5], you'd do merge(1, merge(2, merge(3, merge(4, 5) ) ) ). This is actually supported explicitly in Pandas — one place where I wish R's dataframes had the same built-in capabilities.

ADD REPLYlink written 3.8 years ago by Rob3.6k
3
gravatar for Devon Ryan
3.8 years ago by
Devon Ryan93k
Freiburg, Germany
Devon Ryan93k wrote:

The fastest way to do this is with the dplyr package. This follows the same procedure as Rob mentioned in his comment above, but using dplyr::inner_join() is much faster.

ADD COMMENTlink modified 3.8 years ago • written 3.8 years ago by Devon Ryan93k
Please log in to add an answer.

Help
Access

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