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

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

问题描述

是否可以行绑定两个不具有相同列集的数据框?我希望保留绑定后不匹配的列.

解决方案

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

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.

解决方案

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

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

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