我有一个包含以下列的 excel 文件
Column1 Column2 Column3
ab bb 0.5
ab bc 0.1
ab cd 0.7
ab dd 0.8
ac bb 0.2
ac bg 0.8
ac ee 0.8
ac dd 0.3
x <- data.frame (column1 = c("ab","ab","ab","ab","ac","ac","ac","ac"),
column2 = c("bb","bc","cd","dd","bb","bg","ee","dd"),
column3 = c(0.5, 0.1, 0.7, 0.8, 0.2, 0.8, 0.8, 0.3))
我想改变它。
ab ac
bb 0.5 0.2
bc 0.1
cd 0.7
dd 0.8 0.3
bg 0.8
ee 0.8