我有重塑功能的问题。我现在厌倦它,但它不起作用。我的数据是这样的:R重塑功能
KeyItem Year Value
Income 2011 10000
Income 2010 29299
Depth 2010 29393
Market Cap 2010 39393
Depth 2011 20000
Market Cap 2011 30000
,我需要它看起来像这样我的功能:
KeyItem 2011 2010
Income 10000 29299
Depth 20000 29393
Market Cap 30000 39393
看到这个答案的各种方式来做到这一点的集合:http://stackoverflow.com/a/9617424/210673 – Aaron