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)
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.
Related
So I have been hitting my head against the wall for a few days now trying to understand why my machine will not load choroplethrZip. I have tried the recommended installation pathway (with devtools and github) but I keep receiving the error message below:
#install.packages("devtools")
library(devtools)
install_github('arilamstein/choroplethrZip#v1.5.0')
Downloading GitHub repo arilamstein/choroplethrZip#v1.5.0
from URL https://api.github.com/repos/arilamstein/choroplethrZip/zipball/v1.5.0
Installing choroplethrZip
"C:/PROGRA~1/R/R-35~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/dbrennan/AppData/Local/Temp/Rtmp0q4jjY/devtools29fc168c68f5/arilamstein-choroplethrZip-3cbc9f3" \
--library="C:/Users/dbrennan/Documents/R/win-library/3.5" --install-tests
* installing *source* package 'choroplethrZip' ...
** R
** data
** inst
** tests
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'choroplethr' 2.2.0 is being loaded, but >= 3.3.0 is required
ERROR: lazy loading failed for package 'choroplethrZip'
* removing 'C:/Users/dbrennan/Documents/R/win-library/3.5/choroplethrZip'
In R CMD INSTALL
Installation failed: Command failed (1)
I have tried restarting r and running the code immediately, as well as restarting the computer itself. I have also tried to read the package zip file into R directly but that has not worked either. Any help would be greatly appreciated.
Buried within the error message is this:
namespace 'choroplethr' 2.2.0 is being loaded, but >= 3.3.0 is required
And in fact, if you look at the DESCRIPTION page of choroplethrZip you will see that it imports "choroplethr (>= 3.3.0)".
Since you only have version 2.2.0 installed, I recommend typing:
update.packages()
which will update all your packages. Then try installing and loading choroplethrZip again.
I have this error when trying to run install.packages("rmarkdown"). Can someone please let me know what's wrong?
installing source package 'rmarkdown' ...
** package 'rmarkdown' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no
package called 'backports' ERROR: lazy loading failed for package
'rmarkdown'
removing 'C:/Program Files/R/R-3.2.3/library/rmarkdown'
restoring previous 'C:/Program Files/R/R-3.2.3/library/rmarkdown' Warning in install.packages : running command
'"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" CMD INSTALL -l "C:\Program
Files\R\R-3.2.3\library"
C:\Users\knguyen\AppData\Local\Temp\Rtmp0KyOP9/downloaded_packages/rmarkdown_1.6.tar.gz'
had status 1 Warning in install.packages : installation of package
‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\knguyen\AppData\Local\Temp\Rtmp0KyOP9\downloaded_packages’
Blockquote
Try install the package backports as mentioned in the error.
Try installing the new R Version https://cran.r-project.org/bin/windows/base/old/3.4.3/.
I tried installing R markdown in my R studio, but it keeps looping to ask me to install the package. The R version on my R studio was version 1.1, and after I installed the new R Version, installing the R Markdown package was a success. Hopefully this could help.
I have a package that depends on the package extrafont. If extrafont and its dependency Rttf2pt1 aren't present on the user's system, installation of my package fails. I have extrafont as "Depends" in my package's DESCRIPTION file. When I run devtools::install_git() to install my package from a URL, the output terminates with:
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'Rttf2pt1'
Error : package 'extrafont' could not be loaded
ERROR: lazy loading failed for package 'tntpr'
* removing 'C:/Users/SFirke/Documents/R/win-library/3.3/tntpr'
Looks like extrafont installs okay, but doesn't work because Rttf2pt1 is missing. When I add Rttf2pt1 to the Depends list in my DESCRIPTION file, then the installation succeeds, installing both extrafont and Rttf2pt1 and my package.
Why do I need to put Rttf2pt1 in my Depends list? It's present on the "Imports" list in the DESCRIPTION file from the extrafont package:
Depends:
R (>= 2.15)
Imports:
extrafontdb,
grDevices,
utils,
Rttf2pt1
Additional info
When I run devtools::install_git("https://myurl.com/tntpr.git", dependencies = TRUE), I get the following output. It installs dplyr from GitHub, then extrafonts, then fails loading my package:
Installing tntpr
Downloading GitHub repo hadley/dplyr#master
from URL https://api.github.com/repos/hadley/dplyr/zipball/master
Installing dplyr
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/SFirke/AppData/Local/Temp/RtmpMlRSSR/devtools3dfc4e39620/hadley-dplyr-5902277" --library="C:/Users/SFirke/Documents/R/win-library/3.3" --install-tests
* installing *source* package 'dplyr' ...
** libs
*** arch - i386
C:/RBuildTools/3.4/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-33~1.2/include" -DNDEBUG -I../inst/include -DCOMPILING_DPLYR -I"C:/Users/SFirke/Documents/R/win-library/3.3/Rcpp/include" -I"C:/Users/SFirke/Documents/R/win-library/3.3/BH/include" -I"C:/Users/SFirke/Documents/R/win-library/3.3/bindrcpp/include" -I"C:/Users/SFirke/Documents/R/win-library/3.3/plogr/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
<--- lots more lines like this ^^^^^ --->
** R
** data
*** moving datasets to lazyload DB
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (dplyr)
Installing 1 package: extrafont
Installing package into ‘C:/Users/SFirke/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/extrafont_0.17.zip'
Content type 'application/zip' length 34323 bytes (33 KB)
downloaded 33 KB
package ‘extrafont’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\SFirke\AppData\Local\Temp\RtmpMlRSSR\downloaded_packages
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL "C:/Users/SFirke/AppData/Local/Temp/RtmpMlRSSR/file3dfc4a973a21" \
--library="C:/Users/SFirke/Documents/R/win-library/3.3" --install-tests
* installing *source* package 'tntpr' ...
** R
** data
*** moving datasets to lazyload DB
** inst
** tests
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'Rttf2pt1'
Error : package 'extrafont' could not be loaded
ERROR: lazy loading failed for package 'tntpr'
* removing 'C:/Users/SFirke/Documents/R/win-library/3.3/tntpr'
Error: Command failed (1)
The problem: There are issues specific to Windows where both devtools 1.12.0 (the current CRAN version) and the current development version of devtools 1.12.0.9000 have trouble with nested / recursive dependencies (i.e., say your package A depends on package B which depends on package C; devtools functions install_*(A) will not install C).
See this comment re: the development version and the top parts of the thread that note problems with the CRAN version as well and this package's workaround of manually specifying sub-dependencies to install.
Solution: I installed an old version of devtools 1.11.1 (released April 2016), which works for my install_git() call above even when there are dependencies missing that need to be installed.
install.packages("devtools") # from CRAN
devtools::install_version("devtools", version = "1.11.1", repos = "http://cran.us.r-project.org") # get the old version
Then restart R and use devtools as intended.
When I tried installing quandl it is showing this error message. Can anyone help ??
> install_github("quandl/R-package")
Downloading GitHub repo quandl/R-package#master
Installing Quandl
Installing 1 packages: stringi
package ‘stringi’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘stringi’
"C:/PROGRA~1/R/R-32~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/saikitti/AppData/Local/Temp/RtmpqoWawf/devtools25b4184b2cd/quandl-quandl-r-9182d61" \
--library="C:/Users/saikitti/Documents/R/win-library/3.2" --install-tests
* installing *source* package 'Quandl' ...
** R
** tests
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'stringi'
ERROR: lazy loading failed for package 'Quandl'
* removing 'C:/Users/saikitti/Documents/R/win-library/3.2/Quandl'
Error: Command failed (1)
You missed a Depends::
there is no package called 'stringi'
But Quandl is on CRAN, so why don't you do install.packages("Quandl") ?
I started to get some error message in R when calling libraries that usually work very well. I decided to re-install the packages that were concerned, and also ran into some error..
Any idea what's going on? I'm about to throw my computer thru the window..
> library( "DESeq2" )
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘plyr’
Error: package or namespace load failed for ‘DESeq2’
> install.packages("plyr_1.8.2.tar.gz", repos = NULL, type="source")
Installing package into ‘C:/Users/Sun/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
* installing *source* package 'plyr' ...
** package 'plyr' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-32~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="plyr.dll" OBJECTS="RcppExports.o loop-apply.o split-numeric.o"' had status 127
ERROR: compilation failed for package 'plyr'
* removing 'C:/Users/Sun/Documents/R/win-library/3.2/plyr'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Sun\Documents\R\win-library\3.2" "plyr_1.8.2.tar.gz"' had status 1
2: In install.packages("plyr_1.8.2.tar.gz", repos = NULL, type = "source") :
installation of package ‘plyr_1.8.2.tar.gz’ had non-zero exit status
Thanks to Joran, installing from CRAN actually solved the issue.
install.packages("plyr")