-1

I'm trying to merge replicate data from two columns from different csv files into a single column (of the same name). Each row is a different timepoint. I feel like this should be easy, but I'm new to coding and using the merge or rbind functions haven't gotten me very far.

For example: data1

A

0 1

2 1

4 1

data2

A

0 2

2 2

4 2

I want: data_combined

A

0 1 2

2 1 2

4 1 2

Thanks for any help!

gveazy
  • 1
  • 1
  • 1
    See https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example for tips on how to format your questions to get better help. It's hard to tell what your data looks like in it's current format, using the output of `dput` would be helpful. – Eric Watt Jul 05 '17 at 21:52
  • I think this answer was already asked in https://stackoverflow.com/questions/32098546/how-to-merge-multiples-columns-of-a-table-into-1-in-r . have a good day – Matias Zuñiga Jul 06 '17 at 15:05

1 Answers1

0

If I got your question right, here is your answer:

data_combined <- data.frame(data1, data2[,2])

if it is not what you meant, explain more so that I could help you

Mahdi Baghbanzadeh
  • 540
  • 1
  • 4
  • 10