我有这样的数据集:
rep1_group1 rep1_group2 rep1_group3 rep2_group1 rep2_group2 rep2_group3 rep3_group1 rep3_group2 rep3_group3
18.26426 18.50355 17.87981 18.14181 18.12318 18.37539 17.54155 17.62264 17.21371
21.10751 21.88614 21.26385 21.42588 21.42358 21.48596 21.18138 21.64957 21.56978
19.95816 19.93991 19.17141 19.23463 19.49048 19.69481 19.99466 20.27674 19.83937
15.77427 15.28338 15.56018 14.74557 15.12376 14.87215 17.58013 17.51229 17.24869
18.55157 18.75156 18.51595 18.69129 18.45551 18.9907 18.31092 18.28075 18.00218
24.40756 24.3009 24.0354 23.87117 24.03002 24.39447 24.45595 24.40041 24.03842
20.6223 20.62194 21.19045 20.85316 20.24748 20.99583 21.70248 20.83252 21.417
18.53522 18.20705 17.84586 18.45471 18.03112 18.24859 17.71512 17.46969 17.20132
17.87237 17.80663 15.99771 16.63991 17.51884 17.11533 18.12308 17.90783 18.29576
所以简单地说明行包含测量值,列包含3个研究组,每个重复3次(rep1,rep2,rep3)
当我通常将我的转换应用于数据以获得pca时:
library(ape)
library(data.table)
library(vegan)
tran <- t(data)
tran.pr.b <- vegdist(tran, "bray")
tran.pcoa.b <- pcoa(tran.pr.b)
plot(tran.pcoa.b$vectors[,1:2],main="pcoa, method=bray")
结果是我在图上的数据按重复项分组,而不是按研究组分组。我该如何解决这个问题?
亲切的问候