0

I have tried to install the package tidyverse in RStudio, but have encountered an error. I have copied below the entire results in the Console window. It seems like I need to have dplyr version 1.0.4 installed as a dependency for the package broom. So I tried to install dplyr using install.packages("dplyr") but it ended up installing 0.8.5. Given that I don't have admin access in my laptop, how can I solve this issue? Also, do I really need Rtools? If yes, I will need to convince my office's IT team. Any suggestion will be highly appreciated.

install.packages("tidyverse")
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/
also installing the dependencies ‘rlang’, ‘tidyselect’, ‘vctrs’, ‘dplyr’, ‘broom’, ‘dbplyr’, ‘modelr’


  There are binary versions available but the source versions are later:
           binary source needs_compilation
rlang       0.4.5 0.4.10              TRUE
tidyselect  1.0.0  1.1.0              TRUE
vctrs       0.2.4  0.3.6              TRUE
dplyr       0.8.5  1.0.4              TRUE
broom       0.5.6  0.7.4             FALSE
dbplyr      1.4.3  2.1.0             FALSE
modelr      0.1.6  0.1.8             FALSE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyselect_1.0.0.zip'
Content type 'application/zip' length 242507 bytes (236 KB)
downloaded 236 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/vctrs_0.2.4.zip'
Content type 'application/zip' length 1018801 bytes (994 KB)
downloaded 994 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/dplyr_0.8.5.zip'
Content type 'application/zip' length 3256479 bytes (3.1 MB)
downloaded 3.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyverse_1.3.0.zip'
Content type 'application/zip' length 439648 bytes (429 KB)
downloaded 429 KB

package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tidyselect’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Raihant\AppData\Local\Temp\RtmpWa2w6P\downloaded_packages
installing the source packages ‘broom’, ‘dbplyr’, ‘modelr’

trying URL 'https://cran.rstudio.com/src/contrib/broom_0.7.4.tar.gz'
Content type 'application/x-gzip' length 629713 bytes (614 KB)
downloaded 614 KB

trying URL 'https://cran.rstudio.com/src/contrib/dbplyr_2.1.0.tar.gz'
Content type 'application/x-gzip' length 579687 bytes (566 KB)
downloaded 566 KB

trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.8.tar.gz'
Content type 'application/x-gzip' length 121333 bytes (118 KB)
downloaded 118 KB

* installing *source* package 'broom' ...
** package 'broom' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'dplyr' 0.8.5 is being loaded, but >= 1.0.0 is required
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Program Files/R/R-3.5.2/library/broom'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status
* installing *source* package 'dbplyr' ...
** package 'dbplyr' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'dplyr' 0.8.5 is being loaded, but >= 1.0.3 is required
ERROR: lazy loading failed for package 'dbplyr'
* removing 'C:/Program Files/R/R-3.5.2/library/dbplyr'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘dbplyr’ had non-zero exit status
ERROR: dependency 'broom' is not available for package 'modelr'
* removing 'C:/Program Files/R/R-3.5.2/library/modelr'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
Phil
  • 7,287
  • 3
  • 36
  • 66
Anup
  • 239
  • 2
  • 11
  • 2
    One solution is to upgrade your version of R to 4.0+, then you can install dplyr v1.0+ from CRAN. As a workaround you could try installing the binary from https://cran.r-project.org/bin/windows/contrib/4.0/dplyr_1.0.4.zip using the instructions [here](https://stackoverflow.com/questions/30989027/how-to-install-a-package-from-a-download-zip-file/30989367), but there's no guarantee it will work. – jared_mamrot Feb 16 '21 at 23:24
  • Try to uninstall dplyr and then reinstall it and it should get the latest version, which is 1.0.4. I have gotten away with not downloading r tools for over a year now. I've attempted many times to download it and can't seem to find instructions that make sense for a beginner. – Melissa Salazar Feb 24 '21 at 01:28
  • @MelissaSalazar thanks. I resolved the issue by updating R to the latest version and then reinstalling dplyr. – Anup Feb 27 '21 at 00:31

0 Answers0