Unable to install Tidyverse. Broom issues - r

Whenever I try to install tidyverse in R v 3.6.2
I receive the following error message:
Installing package into ‘C:/Users/daeb/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘broom’
There is a binary version available but the source version is later:
binary source needs_compilation
broom 0.5.3 0.5.4 FALSE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440101 bytes (429 KB)
downloaded 429 KB
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\daeb\AppData\Local\Temp\RtmpuWXq4I\downloaded_packages
installing the source package ‘broom’
trying URL 'https://cran.rstudio.com/src/contrib/broom_0.5.4.tar.gz'
Content type 'application/x-gzip' length 1228129 bytes (1.2 MB)
downloaded 1.2 MB
* installing *source* package 'broom' ...
** package 'broom' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Fejl i loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called 'zeallot'
Kald: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Kørsel stoppet
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/daeb/Documents/R/win-library/3.6/broom'
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
I have tried reinstalling both R and Rstudio but it does not solve the problem. I tried installing Rtools, but it does not work either. It appears I have to solve the source/binary issue with broom but I do not know how.

As #hplieninger suggests, the proximal problem is that the installation of broom is looking for the zeallot package, which isn't installed:
there is no package called 'zeallot'
You should try manually installing the zeallot package (install.packages("zeallot")) and then try installing tidyverse again.
It might also help to say "no" when R asks you whether you want to install the packages with more recent source-code versions from source rather than binary. (The worst thing that can happen is that you end up with slightly older versions of some packages.)
However it's surprising that this requirement comes up. Are you using install.packages("tidyverse")? Are you specifying something like dependencies=TRUE?
Because according to the CRAN index pages
The current version of broom (0.5.4, apparently the same version that R is trying to install for you) doesn't directly import zeallot: it Depends only on R and
Imports: backports, dplyr, generics (≥ 0.0.2), methods, nlme, purrr, reshape2, stringr, tibble, tidyr
The current version of zeallot shouldn't obviously be needed. The packages that use it are:
Reverse imports: completejourney, graphTweets, ipumsr, keras, mlflow, statsExpressions
Reverse suggests: listarrays, SDMtune, vctrs

Related

Cannot load plm package after installing it?

Hello, could someone help me with this? I install the plm package, however, when I try to load it R gives me an error:
library(plm)
Output:
Error in library(plm) : there is no package called ‘plm’"
About the installation of the package that is the output:
install.packages("plm")
Output:
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/be_al/OneDrive - UvA/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘collapse’
There are binary versions available but the source versions are later:
binary source needs_compilation
collapse 1.5.3 1.7.6 TRUE
plm 2.4-1 2.6-1 FALSE
Binaries will be installed
tentando a URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/collapse_1.5.3.zip'
Content type 'application/zip' length 3842937 bytes (3.7 MB)
downloaded 3.7 MB
package ‘collapse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\be_al\AppData\Local\Temp\Rtmp4gBL5q\downloaded_packages
installing the source package ‘plm’
tentando a URL 'https://cran.rstudio.com/src/contrib/plm_2.6-1.tar.gz'
Content type 'application/x-gzip' length 1652371 bytes (1.6 MB)
downloaded 1.6 MB
* installing *source* package 'plm' ...
** package 'plm' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'collapse' 1.5.3 is being loaded, but >= 1.6.0 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execução interrompida
ERROR: lazy loading failed for package 'plm'
* removing 'C:/Users/be_al/OneDrive - UvA/Documents/R/win-library/3.6/plm'
Warning in install.packages :
installation of package ‘plm’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\be_al\AppData\Local\Temp\Rtmp4gBL5q\downloaded_packages’
3. From previous posts here I tried:
install.packages("plm", dependencies = TRUE)
but it still didn't work for me. And I also tried installing and loading multiple times but always get the same error.
Try:
install.packages("plm",type="win.binary")
This must work

How to compile an R package from source code in Windows 10

I need to compile an existing R package whose most recent version exists only as source code (it is on the CRAN website). I am running Windows 10. With Windows, install.packages just installs the older, binary version, which results in an error message and failure to install the package that depends on the one in question because the latter is not the recent version. I installed R Tools to my computer. The Installation and Administration manual for my version (3.6.3) refers to an Option “install.packages.compile.from.source.code”, but I don’t know to what command this option applies. If I run it in an Options() command it returns NULL. Moreover, the older, obsolete, binary version of the package was installed by install.packages. I don’t know if it is interfering with the process or how to get rid of it.
I can find guidance for ordinary install.packages and guidance for compilation oriented to package developers (which I’m not) in Stack Overflow, but nothing that applies to my situation (installing a package having an existing binary whose newest version exists only in source code, given that the binary version is already installed).
Any help you can offer would be greatly appreciated.
Thank you.
Sincerely,
Ward Kingkade
wwardkingkade#gmail.com
Illustration of basic issue (log):
> utils:::menuInstallPkgs()
--- Please select a CRAN mirror for use in this session ---
also installing the dependencies ‘ipred’, ‘recipes’
There are binary versions available but the source versions are later:
binary source needs_compilation
ipred 0.9-11 0.9-12 TRUE
recipes 0.1.16 0.1.17 FALSE
caret 6.0-86 6.0-90 TRUE
Binaries will be installed
trying URL 'https://mirrors.nics.utk.edu/cran/bin/windows/contrib/3.6/ipred_0.9-11.zip'
Content type 'application/zip' length 401183 bytes (391 KB)
downloaded 391 KB
trying URL 'https://mirrors.nics.utk.edu/cran/bin/windows/contrib/3.6/caret_6.0-86.zip'
Content type 'application/zip' length 6258933 bytes (6.0 MB)
downloaded 6.0 MB
package ‘ipred’ successfully unpacked and MD5 sums checked
package ‘caret’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Ward_\AppData\Local\Temp\RtmpghJ2SG\downloaded_packages
installing the source package ‘recipes’
trying URL 'https://mirrors.nics.utk.edu/cran/src/contrib/recipes_0.1.17.tar.gz'
Content type 'application/x-gzip' length 681531 bytes (665 KB)
downloaded 665 KB
* installing *source* package 'recipes' ...
** package 'recipes' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'ipred' 0.9-11 is being loaded, but >= 0.9.12 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'recipes'
* removing 'C:/Users/Ward_/Documents/R/win-library/3.6/recipes'
The downloaded source packages are in
‘C:\Users\Ward_\AppData\Local\Temp\RtmpghJ2SG\downloaded_packages’
Warning message:
In install.packages(lib = .libPaths()[1L], dependencies = NA, type = type) :
installation of package ‘recipes’ had non-zero exit status

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.

stringr will not install in R

I'm having issues installing stringr. Here's what I get when I request an install of stringr:
utils:::menuInstallPkgs()
also installing the dependency ‘stringi’
There are binary versions available but the source versions are later:
binary source needs_compilation
stringi 1.1.5 1.1.6 TRUE
stringr 1.2.0 1.3.0 FALSE
Binaries will be installed
trying URL 'https://ftp.ussg.iu.edu/CRAN/bin/windows/contrib/3.2/stringi_1.1.5.zip'
Content type 'application/zip' length 14220135 bytes (13.6 MB)
downloaded 13.6 MB
package ‘stringi’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\AppData\Local\Temp\3\RtmpsjXf2p\downloaded_packages
installing the source package ‘stringr’
trying URL 'https://ftp.ussg.iu.edu/CRAN/src/contrib/stringr_1.3.0.tar.gz'
Content type 'application/x-gzip' length 118333 bytes (115 KB)
downloaded 115 KB
* installing *source* package 'stringr' ...
** package 'stringr' 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]]) :
namespace 'stringi' 1.1.5 is being loaded, but >= 1.1.6 is required
ERROR: lazy loading failed for package 'stringr'
* removing 'C:/Users/Documents/R/win-library/3.2/stringr'
Thank you for any help you might provide.
The R community generally doesn't support old versions. The last release in the 3.2 series was almost two years ago. Updating to the latest stable release is recommended.
You can see in the error message that:
'stringi' 1.1.5 is being loaded, but >= 1.1.6 is required
And also when it installed stringi it said that:
There are binary versions available but the source versions are later:
So, you need to force the install of the source package. Try this:
utils:::menuInstallPkgs(type="source")
Or just
install.packages("stringr", type="source")

unable to install packages("caret") completely in R version 3.2.3

> require("caret")
Loading required package: caret
Loading required package: lattice
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘pbkrtest’
So I found that there is lack of "pbkrtest" then I tried to reinstall it.
> install.packages("pbkrtest")
Installing package into ‘C:/Users/ADMIN/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
pbkrtest 0.4-2 0.4-3 FALSE
installing the source package ‘pbkrtest’
trying URL 'https://rweb.crmda.ku.edu/cran/src/contrib/pbkrtest_0.4- 3.tar.gz'
Content type 'application/x-gzip' length 164415 bytes (160 KB)
downloaded 160 KB
* installing *source* package 'pbkrtest' ...
** package 'pbkrtest' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Warning: replacing previous import by 'stats::sigma' when loading 'pbkrtest'
Error : object 'sigma' is not exported by 'namespace:stats'
ERROR: lazy loading failed for package 'pbkrtest'
* removing 'C:/Users/ADMIN/Documents/R/win-library/3.2/pbkrtest'
The downloaded source packages are in
‘C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0\downloaded_packages’
Warning messages:
1: running command '"D:/R-3.2.3/bin/x64/R" CMD INSTALL -l
"C:\Users\ADMIN\Documents\R\win-library\3.2"
C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0/downloaded_packages/pbkrtest_0.4- 3.tar.gz' had status 1
2: In install.packages("pbkrtest") :
installation of package ‘pbkrtest’ had non-zero exit status
It seems like that the installation keeps failing.
As a result, I couldn't use other code using caret packages.
I faced this problem as well on Windows 7. I did following steps in the sequence and it worked.
a) Make sure your R version is updated latest R release 3.2.3
b) The default sources seems to be installing Unix version. So I manually downloaded https://cran.r-project.org/web/packages/pbkrtest/index.html for windows
c) Use manually install function from R menu to install the package.
Cheers,
Ratan
Check version of R by typing version in your console.
If version is not "version.string R version 3.3.2" or later then
Install new version of R from https://cran.r-project.org/bin/windows/base/
Update R version using Tools => Global Options in RStudio.
install package using "install.packages("caret")" in your console.
do require(caret).
test using ?createDataPartition.

Resources