Attempting to install rmarkdown package gives me the error - r

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.

Related

Trouble use library(agricolae)

I just updated the R version from 4.0.4 to 4.1.3.
I have successfully installed
install.packages("agricolae").
But, when I run the syntax
library(agricolae),
The output in RGUI shown:
Warning message: package ‘agricolae’ was built under R version 4.0.5.
Then, the output in RStudio shown:
Error: package or namespace load failed for ‘agricolae’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘magrittr’.
So, I tried to install the packages of "magrittr", but failed. The output in RStudio shown:
The system cannot find the path specified. make: \*\*\* \[pipe.o\] Error 1 ERROR: compilation failed for package 'magrittr'
* removing 'C:/Users/Anna/Documents/R/win-library/4.1/magrittr' Warning in install.packages : installation of package ‘magrittr’ had non-zero exit status\.
How can I install the package of agricolae?

Error in installing rgl and shiny package

I am trying to do a scatter3d(y ~ x1+ x2), but I am getting the following error:
Loading required namespace: rgl
Failed with error: ‘there is no package called ‘shiny’’
Error in scatter3d(Vent ~ O2 + CO2) : rgl package missing
I have tried to install rgl in the following way:
install.packages("rgl", repos = c("http://rstudio.org/_packages", "http://cran.rstudio.com"))
install.packages("rgl", depositories = TRUE)
Getting this error:
Errore: package or namespace load failed for ‘rgl’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘shiny’
And if I try to install shiny in the same way that I did for rgl, I get the following
ERROR: dependency 'htmltools' is not available for package 'shiny'
* removing 'C:/Users/franc/Documents/R/win-library/3.5/shiny'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘shiny’ had non-zero exit status
ERROR: dependency 'shiny' is not available for package 'shinytest'
* removing 'C:/Users/franc/Documents/R/win-library/3.5/shinytest'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘shinytest’ had non-zero exit status
Does anyone know what is going on and how I can solve this?
Thank you in advance!

Unable to install tidyverse in R

I am fairly new to R and just updated to R 4.0
When installing tidyverse I see this:
There is a binary version available but the source version
is later:
binary source needs_compilation
broom 0.5.5 0.5.6 FALSE
package ‘tidyverse’ successfully unpacked and MD5 sums checked
"suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))
tools:::makeLazyLoading("broom", '"
Execution halted
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/Chris' PC/Documents/R/win-library/4.0/broom'
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
Then when trying to load this package
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘broom’
I tried independently installing broom to no avail:
> install.packages("broom")
There is a binary version available but the source version
is later:
binary source needs_compilation
broom 0.5.5 0.5.6 FALSE
installing the source package ‘broom’
Error: unexpected string constant in:
"suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE))
tools:::makeLazyLoading("broom", '"
Execution halted
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/Chris' PC/Documents/R/win-library/4.0/broom'
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
Any thoughts on how to clear up this issue?

RShiny installation ERROR: lazy loading failed for package 'shiny'

I am trying to install the Shiny package, and I am getting this error
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'httpuv' 1.4.1 is being loaded, but >= 1.4.4 is required
ERROR: lazy loading failed for package 'shiny'
* removing 'C:/Users/ikum/Documents/R/win-library/3.3/shiny'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\ikum\Documents\R\win-library\3.3" C:\Users\ikum\AppData\Local\Temp\RtmpcbANIA/downloaded_packages/shiny_1.2.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘shiny’ had non-zero exit status
Even when I try to download the latest version of httpuv using the targz file, it is still going to the 1.4.1 version. I deleted httpuv as well and reinstalled it manually as well as from the CRAN repository. Nothing seems to be working.
I also have the latest version or RStudio and R.
Is there a solution to this?
You can try to add type = "binary" argument:
install.packages("shiny", type ="binary")

Error when installing rmarkdown

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.

Resources