第一次变换:melt(WEFData,id.vars = c('Edition','Code.GCR','Series','Attribute'),variable.name="Country",value.name = "Score")
第二次变换:dcast(rankWEFData,Edition+Code.GCR+Attribute + Country ~ Series,value.var = 'Score')
楼主: 陌上路上
|
3159
8
[问答] 使用dcast整合数据,value变成了0,1 |
硕士生 21%
-
|
| ||
| ||
京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明 免责及隐私声明