Hello I have used the following code to generate a PCA graph of my data
library(ggplot2) pca.data <- data.frame(Sample=rownames(pca$x), X=pca$x[,1], Y=pca$x[,2]) pca.data ggplot(data=pca.data, aes(x=X, y=Y, label=Sample)) + geom_text() + xlab(paste("PC1 - ", pca.var.per, "%", sep="")) + ylab(paste("PC2 - ", pca.var.per, "%", sep="")) + theme_bw() + ggtitle("Cancer studies PCA")
But was unable to add ellipses to it. Most tutorials I have seem have used ggbiplot for ellipses, and for some reason I'm unable to download this package (it says it doesn't exist).
What can I do?