为 PCA 图混合时如何确定观察结果
How to determine the observations when they are mashed for a PCA plot
我使用函数 princomp 和 ggfortify 包用 R 完成了 PCA。我无法确定第 4 个组件的所有观察结果(其中有一个 X25 和 2-4 个其他观察结果)。有没有办法让我更顺利地区分它们?我不在乎用什么包,我只是想看看观察结果好多少。
您可以使用 ggfortify
包中的 label.repel=TRUE
。
使用 mtcars
数据集的示例:
重叠标签:
autoplot(prcomp(mtcars),
label=T)
被排斥的标签:
autoplot(prcomp(mtcars),
label=T,label.repel=T)
我使用函数 princomp 和 ggfortify 包用 R 完成了 PCA。我无法确定第 4 个组件的所有观察结果(其中有一个 X25 和 2-4 个其他观察结果)。有没有办法让我更顺利地区分它们?我不在乎用什么包,我只是想看看观察结果好多少。
您可以使用 ggfortify
包中的 label.repel=TRUE
。
使用 mtcars
数据集的示例:
重叠标签:
autoplot(prcomp(mtcars),
label=T)
被排斥的标签:
autoplot(prcomp(mtcars),
label=T,label.repel=T)