6

I am producing a script where I have done many manipulations to a bunch of data and, I do these same manipulations to another dataset. Both data sets have the same rows, columns, and headers. I would like to be able to join the two data sets together where I place dataset A above dataset B. I wouldn't need to headers for dataset B and would instead just clump all of the data together as if they were never really separated in the first place. Is there a simply way to do this?

Brian Tompsett - 汤莱恩
  • 5,438
  • 68
  • 55
  • 126
Tim
  • 345
  • 1
  • 6
  • 19
  • http://stackoverflow.com/questions/3040352/merge-two-data-frames-together-that-have-the-same-variable-names-and-data-types and Joris posted a few more related questions here: http://stackoverflow.com/questions/4141588/join-two-or-more-data-frames-in-system-r – Roman Luštrik Jun 29 '11 at 08:05
  • Thanks Andrie for pointing that out. I will make sure to look more carefully beforehand. – Tim Jun 29 '11 at 19:53

2 Answers2

22

Yes. Use rbind() command.

combineddataset = rbind(dataset1, dataset2)

Hope that helps.

Curious2learn
  • 28,933
  • 40
  • 100
  • 123
3

And for completeness, you could also use the rbind.fill function found in the plyr package.

Btibert3
  • 36,837
  • 43
  • 124
  • 166