forked from tidyverse/tidyverse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
94 lines (69 loc) · 2.72 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
comma <- function(x) {
paste0(paste(x[-length(x)], collapse = ", "), ", and ", x[length(x)])
}
```
# tidyverse
[![Travis-CI Build Status](https://travis-ci.org/hadley/tidyverse.svg?branch=master)](https://travis-ci.org/hadley/tidyverse)
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](http://r4ds.had.co.nz).
## Installation
You can install tidyverse from github with:
```{r gh-installation, eval = FALSE}
# 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:
* 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.
* [jsonlite](https://github.com/jeroenooms/jsonlite) for JSON.
* readxl, for `.xls` and `.xlsx` files.
* xml2, for XML.
* Modelling
* modelr, for modelling within a pipeline
* [broom](https://github.com/dgrtwo/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: `r comma(tidyverse:::load)`. You also get a condensed summary of conflicts with other packages you have loaded:
```{r example}
library(tidyverse)
```
You can see conflicts created later with `tidyverse_conflicts()`:
```{r conflicts}
library(MASS)
tidyverse_conflicts()
```
And you can check that all tidyverse packages are up-to-date with `tidyverse_update()`:
```{r update, eval = FALSE}
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
```