如何从 PCA 中删除分数?

问题描述

我正在使用 ggbiplot 进行 pca 分析。但在双标图中我只想要旋转、变量和圆圈,我不想在我的图中得分,我该怎么做。

我使用的代码

library(ggbiplot)
df = read.csv("data.csv")
pcmodel = prcomp(df[,-1],center=T,scale=T,retx=T)
ggbiplot(pcmodel,obs.scale = 1,var.scale = 1,varname.size = 5,circle = TRUE)

但它给了我这样的画面

The picture I made

我想要这样的图片

The figure I want to make

用于此分析的数据

dput(df)
structure(list(Sampling.Site = c("Acy","Flr","9-MFlr","DBT","Phn","Ant","1-MPhn/Ant","2-MPhn/Ant","Flra","Pyr","Ret","1-MPyr","BcP","BaA","Chry","7-MBaA","BbF","BkF","BeP","BaP","InP","DibA","BghiP","Coronene","Musk Ketone","HHCB"
),Uttara = c(10180.7736,5530.927766,224.4389218,481.9126237,54235.78343,279.1101312,2045.518955,1707.677035,2844.547571,481.9048827,2.516632522,5.983871747,2.003910882,1.682191501,11.45245103,0.1205806,0.352667748,0.106924959,0.13323593,0.021770205,0.642554098,0.006308364,0.014910093,2.275184942,60200.54494),Banani = c(40566.05429,11404.28919,297.1057439,973.6487935,76517.34732,3903.257748,3639.946685,4284.53783,615.8168496,6.446904821,11.05678651,2.13499344,2.671708459,16.89929561,0.18631161,2.987381404,0.106499339,0.132705578,0.021683548,1.273085257,0.038288268,0.013089056,4991.901995),Mokkarom.Vobon..DU = c(14408.64487,14370.13359,236.8899531,494.5102819,56633.23965,1679.388492,1333.932341,2046.554924,207.3227483,1.848494025,2.846027313,0.521964778,2.192078395,11.27169822,0.14298273,1.454329759,0.10669907,0.132954457,0.021724214,0.726203665,0.013247796,0.074345645,0.010649446,0.166817937,4417.20861),Demra = c(10180.7736,294.1984633,1728.396109,56597.97057,2346.064033,2236.584506,2289.863665,5426.904331,772.8531323,6.814397577,7.361293474,8.335782238,11.32898496,42.50372572,0.385936292,3.655849279,0.106685649,0.716515502,0.059283015,1.492406472,0.055221664,0.0618949,0.633193365,3824.689196),Bank.of.Buriganga.River = c(10180.7736,20235.23933,343.4181194,2213.401595,65239.61634,4347.381368,3924.350246,3795.025954,23175.94834,7087.5417,20.85162598,70.53049893,38.64474897,74.84883314,136.5581663,3.165469752,4.68177374,1.735375916,5.869122435,0.901954897,1.894266384,0.056460356,1.614729955,0.099728585,1.375953818,4806.0585
),Kamrangir.Chor = c(10180.7736,142.8825378,798.5192737,47146.33347,1417.472523,4068.273773,4159.1114,23012.47737,2721.053668,13.74703118,45.35809395,24.03940324,58.15699036,159.4654846,1.033533813,4.600008738,0.799523787,2.802075022,0.464869773,2.431210875,0.075629681,0.367576546,0.022518127,0.926969239,7188.639773),Jahangirnagar.University = c(10180.7736,21434.70554,716.3128461,409.9063253,39918.5997,789.7976178,608.3704218,610.6980346,30.41068994,0.939876497,0.894912182,0.078642182,0.589775874,3.295467078,0.024110227,0.776699905,0.107321132,0.133729589,0.021850867,1.095968313,0.030075291,0.095143549,2804.377271),Amin.Bazar = c(42684.64294,22501.06195,1303.777508,1634.729062,76589.30003,1145.91352,3591.002777,3178.334393,3464.877055,734.1175303,4.496582858,15.41859279,9.220231996,10.85086132,39.24851745,0.332235059,1.649464991,0.10652063,0.386069796,0.086174889,1.030413837,0.023914789,0.091192934,2078.33891)),class = "data.frame",row.names = c(NA,-26L))

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...