I am trying to use the plotting function ggbiplot using this code:
install.packages("devtools")
library(devtools)
install_github("vqv/ggbiplot")
g <- ggbiplot(iris.pca, obs.scale = 1, var.scale = 1,
groups = iris[,5], ellipse = TRUE,
circle = TRUE)
g <- g + scale_color_discrete(name = '')
g <- g + theme(legend.direction = 'horizontal',
legend.position = 'top')
print(g)
I get the following error:
Installation failed: there is no package called ‘R6’
Error in library(ggbiplot) : there is no package called ‘ggbiplot’
I am trying to perform some PCA analysis following this demo https://www.r-bloggers.com/computing-and-visualizing-pca-in-r/