0
我有以下數據框。將第一列的行值轉換爲R中的列
Student Score
Thomas 23.6
Sally 28.1
Chris 27.9
Morrison 32.5
Thomas 30.3
Sally 54.2
Morrison 44.3
Chris 99.2
如何轉換成
Thomas Sally Morrison Chris
23.6 28.1 32.5 27.9
30.3 54.2 44.3 99.2
注意:它不具備有以上數據幀的確切順序。
我試着用reshape2,reshape,dcast,melt,cbind等來改變它,我找不到任何有用的東西。
'reshape(pooling_df,idvar =「batchNum」,timevar =「Pooling_QC」,direction =「wide」)'給我警告。 – cooldood3490