当两个数据帧具有不同的列集合时,按行(rbind)组合两个数据帧 [英] Combine two data frames by rows (rbind) when they have different sets of columns

查看:114
本文介绍了当两个数据帧具有不同的列集合时,按行(rbind)组合两个数据帧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以对不具有相同列列的两个数据帧进行绑定?我希望在绑定后保留不匹配的列。



我是R的新手,但认为必须有一个相当快速的方法。



非常感谢,



Brock

解决方案

从包 plyr 中的rbind.fill 可能是您正在寻找的。

Is it possible to row bind two data frames that don't have the same set of columns? I am hoping to retain the columns that do not match after the bind.

I am new to R but figure that there has to be a fairly quick way to do this.

Many thanks,

Brock

解决方案

rbind.fill from the package plyr might be what you are looking for.

这篇关于当两个数据帧具有不同的列集合时,按行(rbind)组合两个数据帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆