如何确定PCA图中的观察结果

时间:2017-07-05 10:57:30

标签: r plot pca

我使用函数 princomp ggfortify 包完成了一个带有R的PCA。我无法确定第4部分的所有观测结果(其中有X25和其他2-4个观测值)。有没有办法让我更顺利地做到这一点,我可以区分它们?我不在乎使用什么包,我只想看看哪些观察结果更好。

enter image description here

1 个答案:

答案 0 :(得分:1)

您可以使用label.repel=TRUE包中的ggfortify

使用mtcars数据集的示例:

重叠标签:

autoplot(prcomp(mtcars),
                  label=T)

enter image description here

推出标签:

autoplot(prcomp(mtcars),
         label=T,label.repel=T)

enter image description here

相关问题