Installation of R Package "comparedf" failed - r

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!

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)

Problem Downloading ggplot on Rstudio on a mac

I'm using a macbook and trying to download ggplot2 using
install.packages("ggplot2")
but the following error keep popping up
* installing *source* package ‘scales’ ...
** package ‘scales’ successfully unpacked and MD5 sums checked
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘colorspace’
ERROR: lazy loading failed for package ‘scales’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/scales’
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependency ‘scales’ is not available for package ‘ggplot2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/gr/_lps4tvd06gd53snb_q3kgn80000gn/T/Rtmp56qAqb/downloaded_packages’
Can anyone help me out with this?

I don't find already installed packages and I'm not able to reinstall..why?

I've always used ggplot2... now R didn't found anymore ggplot2.. so I tried to reinstall the package.. withour success... why??? What should I do?
Also I'm not able to install other packages like lattice extra..
Thank you!
install.packages("ggplot2")
Installing package into ‘C:/Users/vale/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
ggplot2 3.1.1 3.2.1 FALSE
installing the source package ‘ggplot2’
provo con l'URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.2.1.tar.gz'
Content type 'application/x-gzip' length 3204655 bytes (3.1 MB)
downloaded 3.1 MB
* installing *source* package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'colorspace'
ERROR: lazy loading failed for package 'ggplot2'
* removing 'C:/Users/vale/Documents/R/win-library/3.4/ggplot2'
* restoring previous 'C:/Users/vale/Documents/R/win-library/3.4/ggplot2'
In R CMD INSTALL
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\vale\Documents\R\win-library\3.4" C:\Users\vale\AppData\Local\Temp\RtmpgHJKyj/downloaded_packages/ggplot2_3.2.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\vale\AppData\Local\Temp\RtmpgHJKyj\downloaded_packages’
> library(ggplot2)
Errore: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘colorspace’
> install.packages("latticeExtra")
Installing package into ‘C:/Users/vale/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘latticeExtra’ is not available (for R version 3.4.3)
> library(latticeExtra)
Carico il pacchetto richiesto: RColorBrewer
Install the missing colorspace package by executing the following line in R:
install.packages("colorspace")

Problem installing tidyverse in R 3.6.2 - no jsonlite

I am trying to install tidyverse after updating R for mac. I am using Mac OS Catalina 10.15.2
When installing, I get the following error message:
* installing *source* package ‘jsonlite’ ...
** package ‘jsonlite’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘jsonlite’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/jsonlite’
Warning in install.packages :
installation of package ‘jsonlite’ had non-zero exit status
And when trying to load tidyverse. I get the following error message:
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 ‘jsonlite’
I tried to install jsonlite as a seperate package, first uninstalling tidyverse, but got this error message:
package ‘json’ is not available (for R version 3.6.2)
Now at a bit of an impasse. Anyone know how to resolve this issue

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