Closed aleungplants closed 8 months ago
library(phytools) library(ggfortify) data(anoletree) data(anole.data) pca<-phyl.pca(anoletree,anole.data,mode="cov") pca<-as.princomp(pca) pca$scores autoplot(pca)
Say, if I run this code, the Comp.1 values in the figure only go up to 0.5, but the values in pca$scores go up to 1.5... what am I missing here?
pca$scores
I think you should probably investigate what autoplot does. Perhaps it first normalizes the scores in some way? If you run, instead, plot(pca$scores[,1:2]) you should see values that make sense.
autoplot
plot(pca$scores[,1:2])
Say, if I run this code, the Comp.1 values in the figure only go up to 0.5, but the values in
pca$scores
go up to 1.5... what am I missing here?