Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 238
7.2. Packages in the Tidyverse
ОглавлениеLoading the tidyverse will report on which packages are included:
tidyverse
# we assume that you installed the package before: # install.packages(“tidyverse”) # so load it: library(tidyverse) ## - Attaching packages ----------- tidyverse 1.3.0 - ## v ggplot2 3.2.1 v purrr 0.3.3 ## v tibble 2.1.3 v dplyr 0.8.3 ## v tidyr 1.0.0 v stringr 1.4.0 ## v readr 1.3.1 v forcats 0.4.0 ## - Conflicts ------------- tidyverse_conflicts() - ## x purrr::compose() masks pryr::compose() ## x dplyr::filter() masks stats::filter() ## x dplyr::lag() masks stats::lag() ## x purrr::partial() masks pryr::partial()
So, loading the library tidyverse
, loads actually a series of other packages. The collection of these packages are called “core-tidyverse.”
Further, loading tidyverse also informs you about which potential conflicts may occur. For example, we see that calling the function filter()
will dispatch to dplyr::filter()
(ie. “the function filter
in the package dplyr
,” while before loading tidyverse, the function stats::filter()
would have been called).4
filter()