Black Lives Matter. Please consider donating to Black Girls Code today.

Problem installing R package

It’s been awhile since I used R and/or Plotly, so I’m hoping someone can help. I’m trying to install the plotly package and getting a lot of errors. Any ideas? See below:

install.packages(“plotly”)
Installing package into ‘C:/Users/DGuernsey/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘scales’, ‘later’, ‘ggplot2’, ‘digest’, ‘rlang’, ‘promises’

There are binary versions available but the source versions are later:
binary source needs_compilation
scales 0.4.1 1.0.0 TRUE
ggplot2 2.2.1 3.1.0 FALSE
digest 0.6.12 0.6.18 TRUE
plotly 4.5.6 4.8.0 FALSE

Binaries will be installed
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘later’ ‘rlang’
‘promises’
These will not be installed
trying URL ‘https://cran.rstudio.com/bin/windows/contrib/3.2/scales_0.4.1.zip
Content type ‘application/zip’ length 609664 bytes (595 KB)
downloaded 595 KB

trying URL ‘https://cran.rstudio.com/bin/windows/contrib/3.2/digest_0.6.12.zip
Content type ‘application/zip’ length 172453 bytes (168 KB)
downloaded 168 KB

package ‘scales’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘scales’
package ‘digest’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\DGuernsey\AppData\Local\Temp\RtmpQ9shUI\downloaded_packages
installing the source packages ‘ggplot2’, ‘plotly’

ERROR: dependencies ‘rlang’, ‘scales’ are not available for package ‘ggplot2’

  • removing ‘C:/Users/DGuernsey/Documents/R/win-library/3.2/ggplot2’
    Warning in install.packages :
    running command ‘“C:/PROGRA~1/R/R-32~1.3/bin/x64/R” CMD INSTALL -l “C:\Users\DGuernsey\Documents\R\win-library\3.2” C:\Users\DGUERN~1\AppData\Local\Temp\RtmpQ9shUI/downloaded_packages/ggplot2_3.1.0.tar.gz’ had status 1
    Warning in install.packages :
    installation of package ‘ggplot2’ had non-zero exit status
    ERROR: dependencies ‘ggplot2’, ‘scales’, ‘rlang’, ‘promises’ are not available for package ‘plotly’
  • removing ‘C:/Users/DGuernsey/Documents/R/win-library/3.2/plotly’
    Warning in install.packages :
    running command ‘“C:/PROGRA~1/R/R-32~1.3/bin/x64/R” CMD INSTALL -l “C:\Users\DGuernsey\Documents\R\win-library\3.2” C:\Users\DGUERN~1\AppData\Local\Temp\RtmpQ9shUI/downloaded_packages/plotly_4.8.0.tar.gz’ had status 1
    Warning in install.packages :
    installation of package ‘plotly’ had non-zero exit status