【发布时间】:2018-01-29 18:28:27
【问题描述】:
我有多个具有相同列名的数据框。我想合并它们,但根据数据框的名称重命名列。
当前状态:
Dataframe1:
Date Price
12/1/1990 10.00
12/2/1990 11.00
12/3/1990 12.00
Dataframe2:
Date Price
12/1/1990 11.00
12/2/1990 12.00
12/3/1990 14.00
期望状态:
Date DataFrame1Price DataFrame2Price
12/1/1990 10.00 11.00
12/2/1990 11.00 12.00
12/3/1990 12.00 14.00
【问题讨论】:
-
您必须将您的任务划分为较小的可行任务。首先,合并数据框,然后重命名列。 1.How to merge dataframes; 2.How to rename columns.
标签: r dataframe data-binding merge dplyr