tidyr (version 0.3.0)

nest: Nest repeated values in a list-varible.

Description

Nest repeated values in a list-varible.

Usage

nest(data, ...)

Arguments

data
A data frame.
...
Specification of columns to nest. Use bare variable names. Select all variables between x and z with x:z, exclude y with -y. For more options, see the select documentation.

See Also

unnest for the inverse operation.

Examples

Run this code
library(dplyr)
iris %>% nest(-Species)
chickwts %>% nest(weight)

Run the code above in your browser using DataCamp Workspace