1

I tried installing the flexdashboard package but an error message came up:

Here is the code:

devtools::install_github("rstudio/flexdashboard") 

Error Message:

Downloading GitHub repo rstudio/flexdashboard@master
Installing flexdashboard
Installing 1 packages: digest
package ‘digest’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘digest’
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore  \
  CMD INSTALL  \
  "C:/Users/Nicholas/AppData/Local/Temp/RtmpekRfW3/devtools3e9457ae3791/rstudio-flexdashboard-e68ac39"  \
  --library="C:/Users/Nicholas/Documents/R/win-library/3.2" --install-tests 

* installing *source* package 'flexdashboard' ...
** R
** inst
** tests
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'digest'
ERROR: lazy loading failed for package 'flexdashboard'
* removing 'C:/Users/Nicholas/Documents/R/win-library/3.2/flexdashboard'
Error: Command failed (1)
Mekki MacAulay
  • 1,727
  • 2
  • 12
  • 23
nak5120
  • 4,089
  • 4
  • 35
  • 94

1 Answers1

2

It seems to be crashing because it tries to update the digest package upon which it depends, and fails to remove it because it's in use.

Close R and then navigate to C:/Users/Nicholas/Documents/R/win-library/3.2 and delete the digest folder. Then, launch R and try the install again.

Mekki MacAulay
  • 1,727
  • 2
  • 12
  • 23
  • Gosh no!! You do not need to uninstall it. You just need to ensure it is not _currently_ loaded. Ie start a fresh R session, install flexdashboard and move on. Or do what I do on the other OS: Install packages from the command-line. Which avoids that problem (but then you don't have it there as it is a Windoze braindeadness about locks). – Dirk Eddelbuettel Apr 10 '16 at 22:10
  • I agree that the uninstall probably wasn't necessary. However, given that the devtools install tried to remove it, I suggested that OP remove it in case it was corrupted and as a result didn't get replaced properly during the subsequent install even when unloaded. I've experienced this issue on Windows, due to the braindeadness you describe. – Mekki MacAulay Apr 11 '16 at 00:31