Error when installing rmarkdown - r

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.

Related

Issues with RStudio version 3.6.3: troubles installing packages

I upgraded RStudio version to 3.6.3 and have endless issues installing the packages. I have never experienced that before and I am not an expert, so it has been a huge struggle. I posted a question on StackOverflow (Trouble installing package ‘export’ after upgrading R version. Is there an alternative to this package?) with several updates in the comments... The issues are always similar: it seems that the package is being loaded, but then it is not available.
For example:
** package 'dbplyr' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.11 is being loaded, but >= 1.0.0 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'dbplyr'
* removing 'C:/Users/...../Documents/R/win-library/3.6/dbplyr'
Warning in install.packages :
installation of package ‘dbplyr’ had non-zero exit status
> install.packages('Rtools ')
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/..../Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘Rtools ’ is not available (for R version 3.6.3)

Attempting to install rmarkdown package gives me the error

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'xfun' 0.13 is being loaded, but >= 0.15 is required
ERROR: lazy loading failed for package 'knitr'
* removing 'C:/Users/mazen/Documents/R/win-library/3.5/knitr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
ERROR: dependency 'knitr' is not available for package 'rmarkdown'
* removing 'C:/Users/mazen/Documents/R/win-library/3.5/rmarkdown'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
You need to install a more recent version of xfun:
install.packages('xfun')
However, your R version is too old (3.5.x). With this old version of R, you don't have access to CRAN's prebuilt binary version of xfun. Your two choices are:
Either upgrade R;
or install Rtools.
Unless you are in a locked environment that prevents you from upgrading R, I strongly recommend that you upgrade R, instead of installing Rtools for an old version of R.

Installation of R Package "comparedf" failed

I wanted to install the R package comparedf with the following simple code:
install.packages("compareDF")
The R Output afterwards was:
** installing source package 'compareDF' ...
** package 'compareDF' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'rlang'
ERROR: lazy loading failed for package 'compareDF'
* removing 'C:/Users/User/Documents/R/win-library/3.5/compareDF'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘compareDF’ had non-zero exit status
I already tried then:
Installing the package manually
Deleting the folder and try the installation again
restarting R Studio.
Unfortunately, nothing helped.
I would be happy for some help!

Different version of GlobalOptions package in R

I'm trying to install the package "circlize" and I am having trouble resolving what seems to be a simple error.
When I run:
install.packages("circlize")
It says:
Installing package into ‘*file location*/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘GlobalOptions’ is not available
There is a binary version available but the source version is later:
binary source needs_compilation
circlize 0.3.10 0.4.3 FALSE
installing the source package ‘circlize’
trying URL 'https://mirrors.sorengard.com/cran/src/contrib/circlize_0.4.3.tar.gz'
Content type 'application/x-gzip' length 2456906 bytes (2.3 MB)
downloaded 2.3 MB
* installing *source* package 'circlize' ...
** package 'circlize' successfully unpacked and MD5 sums checked
** R
** demo
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'GlobalOptions' 0.0.11 is being loaded, but >= 0.0.12 is required
ERROR: lazy loading failed for package 'circlize'
* removing '*file location*/3.2/circlize'
Warning in install.packages :
running command '"*file location*/x64/R" CMD INSTALL -l "*file location*\3.2" *file location*/downloaded_packages/circlize_0.4.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘circlize’ had non-zero exit status
The downloaded source packages are in
‘*file location*\downloaded_packages’
These parts seem most relevant to me:
dependency ‘GlobalOptions’ is not available
namespace 'GlobalOptions' 0.0.11 is being loaded, but >= 0.0.12 is required
When I run sessionInfo() I see under "other attached packages": [1] GlobalOptions_0.0.11
My best guess is that I have the wrong version of GlobalOptions -- I see that GlobalOptions v0.0.13 is available here, but being new to R, I'm not sure what to do now to get the right version up and running.
I'd really appreciate if someone could tell me where I should look next. (I looked through the documentation within that link, but I'm still lost about what to do now.) Thanks!
If you have R version >=3.3.0 you should
install GlobalOptions_0.0.13 from CRAN
install.packages("GlobalOptions")
quit and restart R
re-install circlize from source as before.
If you have an older R version, update R to a more recent version first.

R error message when calling libraries and installing packages

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")

Resources