zapier/tidyr

Name: tidyr

Owner: Zapier

Description: Easily tidy data with spread and gather functions.

Forked from: tidyverse/tidyr

Created: 2017-06-05 20:18:15.0

Updated: 2017-06-05 20:18:16.0

Pushed: 2017-05-26 15:12:58.0

Homepage: tidyr.tidyverse.org

Size: 2016

Language: R

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

tidyr

Build Status codecov.io CRAN\_Status\_Badge

Overview

The goal of tidyr is to help you create tidy data. Tidy data is data where:

  1. Each variable is in a column.
  2. Each observation is a row.
  3. Each value is a cell.

Tidy data describes a standard way of storing data that is used wherever possible throughout the tidyverse. If you ensure that your data is tidy, you'll spend less timing fighting with the tools and more time working on your analysis.

Installation
e easiest way to get tidyr is to install the whole tidyverse:
all.packages("tidyverse")

ternatively, install just tidyr:
all.packages("tidyr")

 the the development version from GitHub:
stall.packages("devtools")
ools::install_github("tidyverse/tidyr")
Getting started
ary(tidyr)

There are two fundamental verbs of data tidying:

tidyr also provides separate() and extract() functions which makes it easier to pull apart a column that represents multiple variables. The complement to separate() is unite().

To get started, read the tidy data vignette (vignette("tidy-data")) and check out the demos, demo(package = "tidyr")).

Related work

tidyr replaces reshape2 (2010-2014) and reshape (2005-2010). Somewhat counterintuitively each iteration of the the package has done less. tidyr is designed specifically for tidying data, not general reshaping (reshape2), or the general aggregation (reshape).

If you'd like to read more about data reshaping from a CS perspective, I'd recommend the following three papers:

To guide your reading, here's translation between the terminology used in different places:

| tidyr | gather | spread | |————–|———|——–| | reshape(2) | melt | cast | | spreadsheets | unpivot | pivot | | databases | fold | unfold |


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.