【发布时间】:2018-07-12 04:02:49
【问题描述】:
我尝试在库 reshape 和 data.table 的帮助下转换 my_dataset 以实现 result.dataset 但尚未成功。
我有一个数据表my_dataset,看起来像这样:-
A X Count
id1 b 1
id1 c 2
我想要result.dataset 应该是这样的:-
A X1 Count1 X2 Count2
id1 b 1 c 2
如果有人可以帮助我获得上述result.dataset,那就太好了,最好使用reshape 或data.table(或两者都使用lib)。
【问题讨论】:
标签: r data.table reshape reshape2