0

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/

  • 1
    Have you installed the package `R6`? – AkselA Jun 05 '18 at 15:04
  • when I try to install the R6 package I get this: 'code'> install.packages("R6") Installing package into ‘D:/Userfiles/gcanuti/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/R6_2.2.2.zip' Content type 'application/zip' length 316707 bytes (309 KB) downloaded 309 KB package ‘R6’ successfully unpacked and MD5 sums checked Warning in install.packages : unable to move temporary installation ‘D:\Userfiles\gcanuti\Documents\R\win-library\3.4\file2798214e7b85\R6’ to ‘D:\Userfiles\gcanuti\Documents\R\win-library\3.4\R6’ – user8400607 Jun 05 '18 at 15:10
  • Have you attempted the install with admin rights? – jay.sf Jun 05 '18 at 15:18
  • I should have the admin rights. Is there a way to check if I have them? – user8400607 Jun 05 '18 at 15:57
  • After more investigating, the library ggbiplot is in the github repository. When Rstudio tries and installs it, it looks in the Cran repository. How can I force it to look in github? – user8400607 Jun 06 '18 at 13:53

0 Answers0