Python-Tidyverse v1.3.1: Easily install and load packages from the tidyverse

icon
Latest Release: v1.3.1
  • tidyverse now installs dtplyr (#216), googledrive, and googlesheets4 (#229). All packages have been bumped to their latest versions.

  • License changed to MIT (#235).

Source code(tar.gz)
Source code(zip)

tidyverse

Travis-CI Build Status

The tidyverse is a set of packages that work in harmony because they share common data representations and API design. The tidyverse package is designed to make it easy to install and load core packages from the tidyverse in a single command.

If you'd like to learn how to use the tidyverse effectively, the best place to start is R for data science.

Installation

tidyverse is available from CRAN. Install it with:

install.packages("tidyverse")

You can install tidyverse from github with:

# install.packages("devtools")
devtools::install_github("hadley/tidyverse")

This will install the core tidyverse packages that you are likely to use in almost every analysis:

  • ggplot2, for data visualisation.
  • dplyr, for data manipulation.
  • tidyr, for data tidying.
  • readr, for data import.
  • purrr, for functional programming.
  • tibble, for tibbles, a modern re-imagining of data frames.

It also installs a selection of other tidyverse packages that you're likely to use frequently, but probably not in every analysis. This includes packages for:

  • Working with specific types of vectors:

    • hms, for times.
    • stringr, for strings.
    • lubridate, for date/times.
    • forcats, for factors.
  • Importing other types of data:

    • DBI, for databases.
    • haven, for SPSS, SAS and Stata files.
    • httr, for web apis.
    • jsonlite for JSON.
    • readxl, for .xls and .xlsx files.
    • rvest, for web scraping.
    • xml2, for XML.
  • Modelling

    • modelr, for modelling within a pipeline
    • broom, for turning models into tidy data

These packages will be installed along with tidyverse, but you'll load them explicitly with library().

Usage

library(tidyverse) will load the core tidyverse packages: ggplot2, tibble, tidyr, readr, purrr, and dplyr. You also get a condensed summary of conflicts with other packages you have loaded:

library(tidyverse)
#> Loading tidyverse: ggplot2
#> Loading tidyverse: tibble
#> Loading tidyverse: tidyr
#> Loading tidyverse: readr
#> Loading tidyverse: purrr
#> Loading tidyverse: dplyr
#> Conflicts with tidy packages ----------------------------------------------
#> filter(): dplyr, stats
#> lag():    dplyr, stats

You can see conflicts created later with tidyverse_conflicts():

library(MASS)
#> 
#> Attaching package: 'MASS'
#> The following object is masked from 'package:dplyr':
#> 
#>     select
tidyverse_conflicts()
#> Conflicts with tidy packages ----------------------------------------------
#> filter(): dplyr, stats
#> lag():    dplyr, stats
#> select(): dplyr, MASS

And you can check that all tidyverse packages are up-to-date with tidyverse_update():

tidyverse_update()
#> The following packages are out of date:
#>  * broom (0.4.0 -> 0.4.1)
#>  * DBI   (0.4.1 -> 0.5)
#>  * Rcpp  (0.12.6 -> 0.12.7)
#> Update now?
#> 
#> 1: Yes
#> 2: No

Comments

  • Document system dependencies
    Document system dependencies

    Jan 25, 2021

    Short summary

    Document system dependencies like curl or openssl and how to install to them, so especially new users can install them right before installing tidyverse, which makes the whole installation process easier.

    Problem description

    When installing tidyverse, some system dependencies like curl or openssl are needed. If these are not installed, the tidyverse installation process fails:

    ------------------------- ANTICONF ERROR ---------------------------
    Configuration failed because libcurl was not found. Try installing:
     * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
     * rpm: libcurl-devel (Fedora, CentOS, RHEL)
     * csw: libcurl_dev (Solaris)
    If libcurl is already installed, check that 'pkg-config' is in your
    PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
    is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
    R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
    

    or

    --------------------------- [ANTICONF] --------------------------------
    Configuration failed because openssl was not found. Try installing:
     * deb: libssl-dev (Debian, Ubuntu, etc)
     * rpm: openssl-devel (Fedora, CentOS, RHEL)
     * csw: libssl_dev (Solaris)
     * brew: [email protected] (Mac OSX)
    If openssl is already installed, check that 'pkg-config' is in your
    PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config
    is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
    R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...
    

    Users may be confused with these errors (see #225) and even if they understand what to do, the installation process is split into several parts as you have to install the needed packages (e.g. via APT) and then continue the tidyverse installation.

    Suggested change

    Document the installation of needed system dependencies, e.g.:

    apt install libcurl4-openssl-dev libssl-dev # ... maybe more? maybe libxml2-dev, see #243
    

    Of course, installation with rpm, csw and brew should also be documented.

    documentation 
    Reply
  • Encoding issue with symbol U+221A
    Encoding issue with symbol U+221A

    Feb 21, 2021

    When English R locale is used, no issue is present, when Lithuanian (Latvian, etc.) R locale is used (which is the default on my PC), there symbol (U+221A) is displayed incorrectly. These are the results in a fresh R session:

    image

    image

    I use R on Windows 10. I think this issue is Windows-specific.

    1. Could this encoding issue be solved for the Lithuanian, Latvian, etc. locales?
    2. If not, could the symbol U+221A be replaced with the letter v?
    bug 
    Reply
  • List all authors in the text version of the citation
    List all authors in the text version of the citation

    Aug 9, 2021

    In inst/CITATION, the text version of the citation truncates the author list with "et al.".

    How about including the full list of authors? It's standard in some formats to truncate author lists above 6. But more and more allow for large author lists. And it's simple to manually replace the authors with "et al." if someone wants to.

    citation("tidyverse")
    
      Wickham et al., (2019). Welcome to the tidyverse. Journal of Open Source Software, 4(43), 1686, https://doi.org/10.21105/joss.01686
    
    A BibTeX entry for LaTeX users is
    
      @Article{,
        title = {Welcome to the {tidyverse}},
        author = {Hadley Wickham and Mara Averick and Jennifer Bryan and Winston Chang and Lucy D'Agostino McGowan and Romain François and Garrett Grolemund and Alex Hayes and Lionel Henry and Jim Hester and Max Kuhn and Thomas Lin Pedersen and Evan Miller and Stephan Milton Bache and Kirill Müller and Jeroen Ooms and David Robinson and Dana Paige Seidel and Vitalie Spinu and Kohske Takahashi and Davis Vaughan and Claus Wilke and Kara Woo and Hiroaki Yutani},
        year = {2019},
        journal = {Journal of Open Source Software},
        volume = {4},
        number = {43},
        pages = {1686},
        doi = {10.21105/joss.01686},
      }
    

    Here's an APA 7 text version

    Wickham, H., Averick, M., Bryan, J., Chang, W., McGowan, L., François, R., Grolemund, G., Hayes, A., Henry, L., Hester, J., Kuhn, M., Pedersen, T., Miller, E., Bache, S., Müller, K., Ooms, J., Robinson, D., Seidel, D., Spinu, V., … Yutani, H. (2019). Welcome to the Tidyverse. Journal of Open Source Software, 4(43), 1686. https://doi.org/10.21105/joss.01686
    
    feature 
    Reply
  • cpp11 instead of Rcpp; update examples to recent versions
    cpp11 instead of Rcpp; update examples to recent versions

    Dec 8, 2021

    I didn't knit to .md because I am on Windows machine, and so some pretty-printing in README is wrecked.

    Reply
  • Tidyverse wide edition
    Tidyverse wide edition

    Dec 13, 2021

    e.g. tidyverse_edition(2020)

    • https://github.com/tidyverse/ggplot2/issues/4696
    • https://github.com/tidyverse/dplyr/issues/5664
    • https://github.com/tidyverse/glue/issues/246
    Reply
  • Consider adding `rticulate/import`?
    Consider adding `rticulate/import`?

    Dec 20, 2021

    rticulate/import provides a simple way to import packages without polluting the namespace, and solves one of the key issues with R dynamic scoping, and certainly contributes to maintaining the namespace clean, well-organized, intention-oriented and tidy. Asked the author [1], and was given the impression that the author won't object to be included in tidyverse. Would tidyverse consider including a solution like this?

    This is standard in many languages, such as Haskell, Python, Go, ...

    [1] https://github.com/rticulate/import/issues/24

    Reply
  • R-3.5.3 on WIN10 Pro - Error: package or namespace load failed for '...' in rbind(info, getNamespaceInfo(env,
    R-3.5.3 on WIN10 Pro - Error: package or namespace load failed for '...' in rbind(info, getNamespaceInfo(env, "S3methods")): number of columns of matrices must match (see arg 2)

    May 19, 2019

    load library for "core-tidyverse-package" (i.e. tidyverse, ggplo2, dplyr, tidyr, readr, purrr, tibble) except stringr and forcats" fails with matrices column not match error

    Package load via library (...) or require (...) package or namespace load fails for the packages mentioned above; the same error is also encountered for devtools, haven, modelr. For stringr, forcats (from tidyverse core) as well as blob, DBI, lubridate, readxl, rvest package loading via library() works fine

    library("tidyverse")#or ggplot2, dplyr, tidyr, readr, purrr, tibble, devtools, haven or modelr
    Error: package or namespace load failed for 'tidyverse' in rbind(info, getNamespaceInfo(env, "S3methods")):
     number of columns of matrices must match (see arg 2)
    

    my sessionInfo() output

    >sessionInfo() 
    R version 3.5.3 (2019-03-11)
    Platform: x86_64-w64-mingw32/x64 (64-bit)
    Running under: Windows 10 x64 (build 17763)
    
    Matrix products: default
    
    locale:
    [1] C
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    loaded via a namespace (and not attached):
    [1] compiler_3.5.3 fortunes_1.5-5
    

    Versions listing for the mentioned packages

    Failing packages:

    • tidyverse 1.2.1
    • ggplot2 3.1.1
    • dplyr 0.8.1
    • tidyr 0.8.3
    • readr 1.3.1
    • purrr 0.3.2
    • tibble 2.1.1
    • devtools 2.0.2
    • haven 2.1.0
    • modelr 0.1.4
    • vroom 1.0.0

    Working packages:

    • stringr 1.4.0
    • forcats 0.4.0
    • blob 1.1.1
    • DBI 1.0.0
    • lubridate 1.7.4
    • readxl 1.3.1
    • rvest 0.3.4
    Reply
  • pluck_impl object not found
    pluck_impl object not found

    Jan 28, 2019

    Hi, I get an error while loading tidyverse:

    -- Attaching packages --------------------------------------- tidyverse 1.2.1 -- v ggplot2 3.1.0 v purrr 0.3.0 v tibble 2.0.1 v dplyr 0.7.8 v tidyr 0.8.2 v stringr 1.3.1 v readr 1.3.1 v forcats 0.3.0 Error: package or namespace load failed for ‘tidyverse’: .onAttach failed in attachNamespace() for 'tidyverse', details: call: pluck(x, 1, .default = NULL) error: object 'pluck_impl' not found

    sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

    Matrix products: default

    locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252

    attached base packages: [1] stats graphics grDevices utils datasets methods base

    other attached packages: [1] stringr_1.3.1 dplyr_0.7.8 purrr_0.3.0 readr_1.3.1 tidyr_0.8.2 tibble_2.0.1 ggplot2_3.1.0
    [8] tidyverse_1.2.1 Rcpp_1.0.0

    loaded via a namespace (and not attached): [1] Biobase_2.42.0 httr_1.4.0 vsn_3.50.0 jsonlite_1.6 foreach_1.4.4
    [6] modelr_0.1.2 assertthat_0.2.0 BiocManager_1.30.4 affy_1.60.0 stats4_3.5.2
    [11] cellranger_1.1.0 yaml_2.2.0 rcdklibs_2.0 impute_1.56.0 pillar_1.3.1
    [16] backports_1.1.3 lattice_0.20-38 glue_1.3.0 limma_3.38.3 fingerprint_3.5.7
    [21] digest_0.6.18 rvest_0.3.2 colorspace_1.4-0 preprocessCore_1.44.0 plyr_1.8.4
    [26] MALDIquant_1.18 XML_3.98-1.16 pkgconfig_2.0.2 broom_0.5.1 haven_2.0.0
    [31] zlibbioc_1.28.0 scales_1.0.0 itertools_0.1-3 affyio_1.52.0 BiocParallel_1.16.5
    [36] generics_0.0.2 IRanges_2.16.0 withr_2.1.2 RMassBank_2.11.0 BiocGenerics_0.28.0
    [41] lazyeval_0.2.1 cli_1.0.1 readxl_1.2.0 magrittr_1.5 crayon_1.3.4
    [46] ncdf4_1.16 doParallel_1.0.14 nlme_3.1-137 MASS_7.3-51.1 xml2_1.2.0
    [51] forcats_0.3.0 mzR_2.16.1 tools_3.5.2 hms_0.4.2 MSnbase_2.8.3
    [56] S4Vectors_0.20.1 munsell_0.5.0 rcdk_3.4.7.1 bindrcpp_0.2.2 pcaMethods_1.74.0
    [61] compiler_3.5.2 mzID_1.20.1 rlang_0.3.1 grid_3.5.2 RCurl_1.95-4.11
    [66] iterators_1.0.10 rstudioapi_0.9.0 rjson_0.2.20 bitops_1.0-6 gtable_0.2.0
    [71] codetools_0.2-16 R6_2.3.0 lubridate_1.7.4 bindr_0.1.1 ProtGenerics_1.14.0
    [76] stringi_1.2.4 rJava_0.9-10 parallel_3.5.2 png_0.1-7 tidyselect_0.2.5

    Yours Tobias

    Reply
  • reconcile tidyverse with rstudio code introspection
    reconcile tidyverse with rstudio code introspection

    Nov 8, 2016

    I will also submit a bug report to rstudio, but figured it might be reasonable to track here, feel free to close if not. When using tidyverse, the associated functions are not picked up (Rstudio 1.0.44) so get linting warnings all over the place like so:

    image

    pinging @kevinushey and @jjallaire

    Reply
  • .onAttach failed in attachNamespace() for 'tidyverse'
    .onAttach failed in attachNamespace() for 'tidyverse'

    Nov 29, 2017

    Off of a fresh session:

    > sessionInfo()
    R version 3.4.2 (2017-09-28)
    Platform: x86_64-apple-darwin15.6.0 (64-bit)
    Running under: macOS High Sierra 10.13.1
    
    Matrix products: default
    BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
    
    locale:
    [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    loaded via a namespace (and not attached):
    [1] compiler_3.4.2 tools_3.4.2    yaml_2.1.14  
    
    > install.packages("tidyverse")
    trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/tidyverse_1.2.1.tgz'
    Content type 'application/x-gzip' length 77756 bytes (75 KB)
    ==================================================
    downloaded 75 KB
    
    
    The downloaded binary packages are in
    	/var/folders/1z/808_xcnx2fx8d9d2l4d8_hqr0000gn/T//Rtmp47lIBe/downloaded_packages
    
    > library(tidyverse)
    ── Attaching packages ───────────────────────────────────────────── tidyverse 1.2.1 ──
    ✔ ggplot2 2.2.1          ✔ purrr   0.2.4     
    ✔ tibble  1.3.4.9003     ✔ dplyr   0.7.4.9000
    ✔ tidyr   0.7.2          ✔ stringr 1.2.0     
    ✔ readr   1.1.1.9000     ✔ forcats 0.2.0.9000
    Error: package or namespace load failed for ‘tidyverse’:
     .onAttach failed in attachNamespace() for 'tidyverse', details:
      call: NULL
      error: Index 1 must be a character or numeric vector
    

    Empty ~/.Renviron and I've also tried installing everything from CRAN:

    > library(tidyverse)
    ── Attaching packages ───────────────────────────────────────────── tidyverse 1.2.1 ──
    ✔ ggplot2 2.2.1     ✔ purrr   0.2.4
    ✔ tibble  1.3.4     ✔ dplyr   0.7.4
    ✔ tidyr   0.7.2     ✔ stringr 1.2.0
    ✔ readr   1.1.1     ✔ forcats 0.2.0
    Error: package or namespace load failed for ‘tidyverse’:
     .onAttach failed in attachNamespace() for 'tidyverse', details:
      call: NULL
      error: Index 1 must be a character or numeric vector
    
    Reply
  • tidyverse Error in date_names_lang(date_names) cannot open file sysdata.rdb No such file or directory
    tidyverse Error in date_names_lang(date_names) cannot open file sysdata.rdb No such file or directory

    Mar 8, 2017

    Issue

    I’m getting the following error attempting to use the read_csv from tidyverse:

    Error in date_names_lang(date_names) : cannot open file '~/R/x86_64-pc-linux-gnu-library/3.3/readr/R/sysdata.rdb': No such file or directory

    Steps to Reproduce

    1. Load tidyverse library("tidyverse", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.3")
    2. Run read_csv command raw <- read_csv("https://data.ny.gov/api/views/q6ts-kwhk/rows.csv?accessType=DOWNLOAD")
    3. Result

    Error in date_names_lang(date_names) : cannot open file '~/R/x86_64-pc-linux-gnu-library/3.3/readr/R/sysdata.rdb': No such file or directory

    Steps Taken to Analyze Issue

    1. Terminate R Session
    2. Load readr library("readr", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.3")
    3. Run read_csv command raw <- read_csv("https://data.ny.gov/api/views/q6ts-kwhk/rows.csv?accessType=DOWNLOAD")
    4. Result

    Parsed with column specification: cols( Year = col_integer(), Incident Date = col_character(), Incident Type = col_character(), Track = col_character(), Inv Location = col_character(), Racing Type Description = col_character(), Division = col_character(), Weather Conditions = col_character(), Horse = col_character(), Trainer = col_character(), Jockey Driver = col_character(), Incident Description = col_character(), Death or Injury = col_character() )

    1. Terminate R Session
    2. Load readr library("readr", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.3")
    3. Load tidyverse library("tidyverse", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.3")
    4. Run read_csv command raw <- read_csv("https://data.ny.gov/api/views/q6ts-kwhk/rows.csv?accessType=DOWNLOAD")
    5. Result

    Parsed with column specification: cols( Year = col_integer(), Incident Date = col_character(), Incident Type = col_character(), Track = col_character(), Inv Location = col_character(), Racing Type Description = col_character(), Division = col_character(), Weather Conditions = col_character(), Horse = col_character(), Trainer = col_character(), Jockey Driver = col_character(), Incident Description = col_character(), Death or Injury = col_character() )

    Steps Taken to Attempt Resolution

    1. Remove readr package remove.packages("readr", lib="~/R/x86_64-pc-linux-gnu-library/3.3")
    2. Install readr package install.packages("readr")
    3. Remove tidyverse package remove.packages("tidyverse", lib="~/R/x86_64-pc-linux-gnu-library/3.3")
    4. Install tidyverse package install.packages("tidyverse")

    Session Info

    devtools::session_info()

    Session info ------------------------------------------------------------------------------------- setting value
    version R version 3.3.3 (2017-03-06) system x86_64, linux-gnu
    ui RStudio (1.0.136)
    language (EN)
    collate en_US.UTF-8
    tz America/New_York
    date 2017-03-07

    Packages ----------------------------------------------------------------------------------------- package * version date source
    assertthat 0.1 2013-12-06 CRAN (R 3.3.2) broom 0.4.2 2017-02-13 CRAN (R 3.3.2) colorspace 1.3-2 2016-12-14 CRAN (R 3.3.2) curl 2.3 2016-11-24 CRAN (R 3.3.2) DBI 0.5-1 2016-09-10 CRAN (R 3.3.2) devtools 1.12.0 2016-12-05 CRAN (R 3.3.3) digest 0.6.12 2017-01-27 CRAN (R 3.3.2) dplyr * 0.5.0 2016-06-24 CRAN (R 3.3.2) forcats 0.2.0 2017-01-23 CRAN (R 3.3.2) foreign 0.8-67 2016-09-13 CRAN (R 3.3.1) ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.3.2) gtable 0.2.0 2016-02-26 CRAN (R 3.3.2) haven 1.0.0 2016-09-23 CRAN (R 3.3.2) hms 0.3 2016-11-22 CRAN (R 3.3.2) httr 1.2.1 2016-07-03 CRAN (R 3.3.2) jsonlite 1.3 2017-02-28 CRAN (R 3.3.2) lattice 0.20-34 2016-09-06 CRAN (R 3.3.1) lazyeval 0.2.0 2016-06-12 CRAN (R 3.3.2) lubridate 1.6.0 2016-09-13 CRAN (R 3.3.2) magrittr 1.5 2014-11-22 CRAN (R 3.3.2) memoise 1.0.0 2016-01-29 CRAN (R 3.3.3) mnormt 1.5-5 2016-10-15 CRAN (R 3.3.2) modelr 0.1.0 2016-08-31 CRAN (R 3.3.2) munsell 0.4.3 2016-02-13 CRAN (R 3.3.2) nlme 3.1-131 2017-02-06 CRAN (R 3.3.2) plyr 1.8.4 2016-06-08 CRAN (R 3.3.2) psych 1.6.12 2017-01-08 CRAN (R 3.3.2) purrr * 0.2.2 2016-06-18 CRAN (R 3.3.2) R6 2.2.0 2016-10-05 CRAN (R 3.3.2) Rcpp 0.12.9 2017-01-14 CRAN (R 3.3.2) readr * 1.0.0 2016-08-03 CRAN (R 3.3.3) readxl 0.1.1 2016-03-28 CRAN (R 3.3.2) reshape2 1.4.2 2016-10-22 CRAN (R 3.3.2) rvest 0.3.2 2016-06-17 CRAN (R 3.3.2) scales 0.4.1 2016-11-09 CRAN (R 3.3.2) stringi 1.1.2 2016-10-01 CRAN (R 3.3.2) stringr 1.2.0 2017-02-18 CRAN (R 3.3.2) tibble * 1.2 2016-08-26 CRAN (R 3.3.2) tidyr * 0.6.1 2017-01-10 CRAN (R 3.3.2) tidyverse * 1.1.1 2017-01-27 CRAN (R 3.3.2) withr 1.0.2 2016-06-20 CRAN (R 3.3.3) xml2 1.1.1 2017-01-24 CRAN (R 3.3.2)

    Reply
  • Error installing tidyverse on macOS 10.10.5/R 3.4.1
    Error installing tidyverse on macOS 10.10.5/R 3.4.1

    Aug 14, 2017

    Attempting to install ‹tidyverse› on a blank-slate installation fails due to what seems like a circular dependency of the packages that therefore cannot be unloaded in the last step of the installation (that test whether the package can be loaded).

    Here’s an MWE:

    dir.create('test-library')
    .libPaths('test-library')
    install.packages('tidyverse')
    

    This yields:

    Installing package into ‘/Users/rudolph/tmp/test-library’
    (as ‘lib’ is unspecified)
    also installing the dependencies ‘colorspace’, ‘mnormt’, ‘bindr’, ‘RColorBrewer’, ‘dichromat’, ‘munsell’, ‘labeling’, ‘rematch’, ‘plyr’, ‘psych’, ‘reshape2’, ‘assertthat’, ‘bindrcpp’, ‘glue’, ‘pkgconfig’, ‘rlang’, ‘R6’, ‘Rcpp’, ‘BH’, ‘plogr’, ‘digest’, ‘gtable’, ‘scales’,
     ‘lazyeval’, ‘mime’, ‘curl’, ‘openssl’, ‘cellranger’, ‘stringi’, ‘selectr’, ‘broom’, ‘dplyr’, ‘forcats’, ‘ggplot2’, ‘haven’, ‘httr’, ‘hms’, ‘jsonlite’, ‘lubridate’, ‘magrittr’, ‘modelr’, ‘purrr’, ‘readr’, ‘readxl’, ‘stringr’, ‘tibble’, ‘rvest’, ‘tidyr’, ‘xml2’
    […]
    trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/tidyverse_1.1.1.tar.gz'
    Content type 'application/x-gzip' length 23452 bytes (22 KB)
    ==================================================
    downloaded 22 KB
    * installing *source* package ‘tidyverse’ ...
    ** package ‘tidyverse’ successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    Error: package or namespace load failed for ‘tidyverse’:
     .onAttach failed in attachNamespace() for 'tidyverse', details:
      call: value[[3L]](cond)
      error: Package ‘tidyr’ version 0.6.3 cannot be unloaded:
     Error in unloadNamespace(package) : namespace ‘tidyr’ is imported by ‘broom’, ‘tidyverse’ so cannot be unloaded
    
    Error: loading failed
    Execution halted
    ERROR: loading failed
    * removing ‘/Users/rudolph/tmp/test-library/tidyverse’
    
    The downloaded source packages are in
            ‘/private/var/folders/9t/zz9zg0v914z_64yc4v2qtcp40000gn/T/RtmpDSaA9l/downloaded_packages’
    Warning message:
    In install.packages("tidyverse") :
      installation of package ‘tidyverse’ had non-zero exit status
    

    Rerunning the installation yields the same error every time. It sees as if all the constituent packages are actually successfully installed — just not ‹tidyverse› itself.

    > sessionInfo()
    R version 3.4.1 (2017-06-30)
    Platform: x86_64-apple-darwin14.5.0 (64-bit)
    Running under: OS X Yosemite 10.10.5
    
    Matrix products: default
    BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
    
    locale:
    [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base
    
    loaded via a namespace (and not attached):
    [1] compiler_3.4.1 tools_3.4.1
    
    Reply