Appending data in R

大憨熊 提交于 2020-01-01 10:03:10

问题


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?


回答1:


Yes. Use rbind() command.

combineddataset = rbind(dataset1, dataset2)

Hope that helps.




回答2:


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



来源:https://stackoverflow.com/questions/6516116/appending-data-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!