In my script for PCA (below), I always get a graph of PC1 vs PC2.
mydata.pca <- prcomp(mydata.fixed, center = TRUE, scale. = TRUE)
g <- ggbiplot(mydata.pca, obs.scale = 1, var.scale = 1,
groups = mysamples, ellipse = FALSE,
circle = FALSE, var.axes=FALSE)
g <- g + scale_color_discrete(name = '')
g <- g + theme(legend.direction ='horizontal',
legend.position = 'top')
g <- g + theme_bw()
However, when I run something like:
summary(mydata.pca)
I see all the info for PC1 to PC4. How can I change my ggbioplot script to get a graph of PC1 vs PC3?