PCA - uploading ggplot and devtool error

I am new to R and would like some assistance with PCA.
I used Datacamp to guide me through the process but run into errors with devtools and ggplot.

> library(devtools)
Error: package or namespace load failed for ‘devtools’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘digest’
In addition: Warning message:
package ‘devtools’ was built under R version 3.4.4 
> install_github("vqv/ggbiplot")
Error in install_github("vqv/ggbiplot") : 
  could not find function "install_github"
> library(ggplot)
Error in library(ggplot) : there is no package called ‘ggplot’

I have updated my RStudio and tried to follow instruction from other forums.
Assistance welcomed
Kind regards
Peter

It seems like you've got a few things going on here.

  1. You're missing the digest package, which you need. You can install it with: install.packages("digest").
  2. As a result, you're unable to load the devtools package.
  3. Because you can't load devtools, you don't have access to the install_github() function. So, you're not actually installing "vqv/ggbiplot".
  4. Error in library(ggplot) : there is no package called ‘ggplot’ I'm guessing that you meant to do library(ggplot2) and not ggplot.

So, first thing's first, you should install digest, and make sure you have a working installation of devtools. If you're on Windows, you'll also need Rtools to build a package from GitHub (nice slide deck on how to install Rtools here).

For more details re. getting properly set up with Windows or Mac, I highly recommend this step-by-step:

4 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.