tidyr/ 0000755 0001762 0000144 00000000000 14176170743 011417 5 ustar ligges users tidyr/NAMESPACE 0000644 0001762 0000144 00000007033 14174554621 012640 0 ustar ligges users # Generated by roxygen2: do not edit by hand
S3method(complete,data.frame)
S3method(complete,grouped_df)
S3method(complete_,data.frame)
S3method(drop_na,data.frame)
S3method(drop_na_,data.frame)
S3method(expand,data.frame)
S3method(expand,grouped_df)
S3method(expand_,data.frame)
S3method(extract,data.frame)
S3method(extract_,data.frame)
S3method(fill,data.frame)
S3method(fill_,data.frame)
S3method(full_seq,Date)
S3method(full_seq,POSIXct)
S3method(full_seq,numeric)
S3method(gather,data.frame)
S3method(gather_,data.frame)
S3method(nest,data.frame)
S3method(nest,grouped_df)
S3method(nest,tbl_df)
S3method(nest_legacy,data.frame)
S3method(nest_legacy,tbl_df)
S3method(pivot_longer,data.frame)
S3method(pivot_wider,data.frame)
S3method(replace_na,data.frame)
S3method(replace_na,default)
S3method(separate,data.frame)
S3method(separate_,data.frame)
S3method(separate_rows,data.frame)
S3method(separate_rows_,data.frame)
S3method(spread,data.frame)
S3method(spread_,data.frame)
S3method(unite,data.frame)
S3method(unite_,data.frame)
S3method(unnest,data.frame)
S3method(unnest,rowwise_df)
S3method(unnest_legacy,data.frame)
export("%>%")
export(all_of)
export(any_of)
export(as_tibble)
export(build_longer_spec)
export(build_wider_spec)
export(check_pivot_spec)
export(chop)
export(complete)
export(complete_)
export(contains)
export(crossing)
export(crossing_)
export(drop_na)
export(drop_na_)
export(ends_with)
export(everything)
export(expand)
export(expand_)
export(expand_grid)
export(extract)
export(extract_)
export(extract_numeric)
export(fill)
export(fill_)
export(full_seq)
export(gather)
export(gather_)
export(hoist)
export(last_col)
export(matches)
export(nest)
export(nest_)
export(nest_legacy)
export(nesting)
export(nesting_)
export(num_range)
export(one_of)
export(pack)
export(pivot_longer)
export(pivot_longer_spec)
export(pivot_wider)
export(pivot_wider_spec)
export(replace_na)
export(separate)
export(separate_)
export(separate_rows)
export(separate_rows_)
export(spread)
export(spread_)
export(starts_with)
export(tibble)
export(tidyr_legacy)
export(tribble)
export(unchop)
export(uncount)
export(unite)
export(unite_)
export(unnest)
export(unnest_)
export(unnest_auto)
export(unnest_legacy)
export(unnest_longer)
export(unnest_wider)
export(unpack)
import(rlang)
import(vctrs)
importFrom(dplyr,tbl_vars)
importFrom(glue,glue)
importFrom(lifecycle,deprecated)
importFrom(magrittr,"%>%")
importFrom(purrr,accumulate)
importFrom(purrr,discard)
importFrom(purrr,every)
importFrom(purrr,keep)
importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,map2_chr)
importFrom(purrr,map2_dbl)
importFrom(purrr,map2_df)
importFrom(purrr,map2_int)
importFrom(purrr,map2_lgl)
importFrom(purrr,map_at)
importFrom(purrr,map_chr)
importFrom(purrr,map_dbl)
importFrom(purrr,map_df)
importFrom(purrr,map_if)
importFrom(purrr,map_int)
importFrom(purrr,map_lgl)
importFrom(purrr,pmap)
importFrom(purrr,pmap_chr)
importFrom(purrr,pmap_dbl)
importFrom(purrr,pmap_df)
importFrom(purrr,pmap_int)
importFrom(purrr,pmap_lgl)
importFrom(purrr,reduce)
importFrom(purrr,some)
importFrom(purrr,transpose)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
importFrom(tibble,tribble)
importFrom(tidyselect,all_of)
importFrom(tidyselect,any_of)
importFrom(tidyselect,contains)
importFrom(tidyselect,ends_with)
importFrom(tidyselect,everything)
importFrom(tidyselect,last_col)
importFrom(tidyselect,matches)
importFrom(tidyselect,num_range)
importFrom(tidyselect,one_of)
importFrom(tidyselect,starts_with)
importFrom(utils,packageVersion)
importFrom(utils,type.convert)
useDynLib(tidyr, .registration = TRUE)
tidyr/LICENSE 0000644 0001762 0000144 00000000070 14167314246 012417 0 ustar ligges users YEAR: 2014
COPYRIGHT HOLDER: Hadley Wickham and RStudio
tidyr/README.md 0000644 0001762 0000144 00000011255 14174555012 012674 0 ustar ligges users
# tidyr
[](https://cran.r-project.org/package=tidyr)
[](https://github.com/tidyverse/tidyr/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/tidyverse/tidyr?branch=main)
## Overview
The goal of tidyr is to help you create **tidy data**. Tidy data is data
where:
1. Every column is variable.
2. Every row is an observation.
3. Every cell is a single value.
Tidy data describes a standard way of storing data that is used wherever
possible throughout the [tidyverse](https://www.tidyverse.org/). If you
ensure that your data is tidy, you’ll spend less time fighting with the
tools and more time working on your analysis. Learn more about tidy data
in `vignette("tidy-data")`.
## Installation
``` r
# The easiest way to get tidyr is to install the whole tidyverse:
install.packages("tidyverse")
# Alternatively, install just tidyr:
install.packages("tidyr")
# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidyverse/tidyr")
```
## Cheatsheet
## Getting started
``` r
library(tidyr)
```
tidyr functions fall into five main categories:
- “Pivotting” which converts between long and wide forms. tidyr 1.0.0
introduces `pivot_longer()` and `pivot_wider()`, replacing the older
`spread()` and `gather()` functions. See `vignette("pivot")` for
more details.
- “Rectangling”, which turns deeply nested lists (as from JSON) into
tidy tibbles. See `unnest_longer()`, `unnest_wider()`, `hoist()`,
and `vignette("rectangle")` for more details.
- Nesting converts grouped data to a form where each group becomes a
single row containing a nested data frame, and unnesting does the
opposite. See `nest()`, `unnest()`, and `vignette("nest")` for more
details.
- Splitting and combining character columns. Use `separate()` and
`extract()` to pull a single character column into multiple columns;
use `unite()` to combine multiple columns into a single character
column.
- Make implicit missing values explicit with `complete()`; make
explicit missing values implicit with `drop_na()`; replace missing
values with next/previous value with `fill()`, or a known value with
`replace_na()`.
## Related work
tidyr
[supersedes](https://lifecycle.r-lib.org/articles/stages.html#superseded)
reshape2 (2010-2014) and reshape (2005-2010). Somewhat
counterintuitively, each iteration of the package has done less. tidyr
is designed specifically for tidying data, not general reshaping
(reshape2), or the general aggregation (reshape).
[data.table](https://rdatatable.gitlab.io/data.table) provides
high-performance implementations of `melt()` and `dcast()`
If you’d like to read more about data reshaping from a CS perspective,
I’d recommend the following three papers:
- [Wrangler: Interactive visual specification of data transformation
scripts](http://vis.stanford.edu/papers/wrangler)
- [An interactive framework for data
cleaning](https://www2.eecs.berkeley.edu/Pubs/TechRpts/2000/CSD-00-1110.pdf)
(Potter’s wheel)
- [On efficiently implementing SchemaSQL on a SQL database
system](https://www.vldb.org/conf/1999/P45.pdf)
To guide your reading, here’s a translation between the terminology used
in different places:
| tidyr 1.0.0 | pivot longer | pivot wider |
|----------------|--------------|-------------|
| tidyr \< 1.0.0 | gather | spread |
| reshape(2) | melt | cast |
| spreadsheets | unpivot | pivot |
| databases | fold | unfold |
## Getting help
If you encounter a clear bug, please file a minimal reproducible example
on [github](https://github.com/tidyverse/tidyr/issues). For questions
and other discussion, please use
[community.rstudio.com](https://community.rstudio.com/).
------------------------------------------------------------------------
Please note that the tidyr project is released with a [Contributor Code
of Conduct](https://tidyr.tidyverse.org/CODE_OF_CONDUCT.html). By
contributing to this project, you agree to abide by its terms.
tidyr/data/ 0000755 0001762 0000144 00000000000 14167314246 012326 5 ustar ligges users tidyr/data/who.rdata 0000644 0001762 0000144 00000474367 14167314246 014165 0 ustar ligges users ]]{n^llbB`LH $۸kpxlYK;=!$/;!/={tG4Hi43z7Nɤ\_T2)IE:/%r5nޣ.ܿmpm(9EmlDIK3;qV.u({niۼmS^vЖ'ڑ5%S~yv^ۦwmJҭtN1oݖ
R>:2R^1eyv2
R>wf;]10V*I%qKoڿ#em){ovvM;6T_Ji4#S~|-ûR^pp֔7fk^1r\u2w|2eUͻr'zmt[v
n98KO=C:6=Kϥs{Q<8זsܔO0?~ዡxտc(hYvm4lC=7
T_Jo8))S>CCR>GoϽR֪TJylVy!{ڸet?O;_YSrxu-)s]_Rn2',va2כ{]^[AP*O|mS>|ۂCy蔔7e0/3~MTjev?R2aMG/thpx »kaۂpleA~C:xۂ]4Kylʔ'&.bͫ4J\8uaVھegzճlhx?=N{gvn -\z.=smm8e
nڵs0S~mVʧ|=N;m.տih8e/߾3e~qo4(hKvҳxයa5H7ҍ}Ѷhxpp[;vmL{e}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